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