how do you solve this?

You have to basically use clues in the test to find out what X is ( my method ) in this situation you have a fraction, you're going to add 2 wholes which is gonna make it 7 wholes. The only way to get that is to have an improper fraction. 5 + 2 = 7 so 5 x 8 = 40/8. Turned into a mixed fraction is, you know, 5. You have your answer; X is equal to 40.