The way I taught my child was to try with each option, that is, start with option A, assume 40 is the number of soldiers, then calculate no of legs of soldiers, then minus that from total no. of legs, and see if the resulting number gives u the required number of horses you need in order to get a total of 45 horses and soldiers.
Repeat the same for option B, C and D.
Answer is B. This is how we did it:
Assume 35 as no. of soldiers
35x2 = 70 legs of soldiersM
Minus 70 from 110 (total legs)= 40 legs
40 horses legs = 40 divided by 4 =10 horses
Therefore 35 soldiers and 10 horses = 45 soldiers and horses totally