Suppose there are 4 types of instructions A, B, C, and D and there are 100 units of time taken by them.
It is given that 25 units of time is taken by type A, 25 units of time is taken by type B, x units of time is taken by type C, and the rest(= 50-x) unit of time is taken by type D.
Now, when partial speed ups are applied time taken by type A instructions = 25/30 (Since the speed up is of 30)
time taken by type B = 25/20
time taken by type C = x/15
time taken by type D = (50-x)/1 = 50-x
Total time taken now = 25/30 + 25/20 + x/15 + 50-x
Speedup = (former time)/(new time) = 100/ (25/30 + 25/20 + x/15 + 50-x) = 10. (Solving this x comes out to be 45, which is 45% of 100).
Getting to Amdahl's law:
Speed up = 1/ ( (Sum of fractional speedup) + (1-fractions of given instructions) )
[This equation is equivalent to above if we had assumed 1 instruction instead of 100]
Sorry for the bad formatting. Please let me know if this is unclear.