Question 431459
Let J equal John, M for Mary;

J=3M
J-M=24

Substituting for J we get;

3M-M=24
2M=24
M=12

Mary is 12.
Since J=3m, John is 36.