We have two numbers, so we need two variables. Let us call them X and Y.
"One number is 24 more than the other" ⇒ Y = X + 24 (1)
Here, I've named Y to be "one number" and X to be "the other". If you write X = Y + 24, you would also be correct!
"The sum of two numbers is 60" ⇒ X + Y = 60 (2)
Now, take a look at equation (1): Y = X + 24.
We can plug in this equation to (2): X + Y = 60, so X + (X + 24) = 60.
Therefore, 2X + 24 = 60; 2X = 60 - 24 = 36; X = 18. (3)
Now we can plug equation (3) into either equation (1) or (2).
X + Y = 60; 18 + Y = 60; Y = 60 - 18 = 42.
OR
Y = X + 24; Y = 18 + 24 = 42.
**It is important to note that X and Y solves both the equations (1) and (2).
Check the wording of the question to see if this makes sense:
The sum of 18 and 42 is 60. 42 is 24 more than 18.