Answer :

 All you have to do is times 100 by 50 and then divide the product: 5000 by 40 which equals 125.

how I solved it (solved for X) below:

40/100 = 50/x --> 50*100 = 40x --> 5000 = 40x --> 5000/40 = x --> 125 = x

KEY: / means divide  * means times  = means equals  --> means "next step"

It is called cross multiplication 
so a hack is we know that 20% times 5 =100% and 40 divided by 2=20 so

50=40%
divide both sides by 2
25=20%

20 times 5=100 so
multiply both sides by 5
125=100%