Question 1163882
m = number of years old the man is  now.
s = number of years old his sone is now.


two years ago, the man was 7 times older than his son.


there is a difference between 7 times as old and 7 times older.
7 times as old says that a = 7 * b
7 times older says that a = b + 7*b = 8*b


your problem statement seems to mix them both.
i suspect you meant as old as, rather than older than.


i'll assume that, therefore, i'll rephrase the problem statement to say:


Two years ago a man was 7 times as old as his son, but in three years he will be only four times as old as his son.
How old are they?


your formulas are:


(m - 2) = 7 * (s - 2)
(m + 3) = 4 * (s + 3)


simplify these formulas to get:


m - 2 = 7 * s - 14
m + 3 = 4 * s + 12


solve for m in both equations to get:


m =  7 * s - 12
m = 4 * s + 9


subtract the second equation from the first to get  0 = 3 * s - 21
add 21 to both sides of this equation to get 21 = 3 * s
solve for s to get s = 7


2 years ago, the son was 5 and the man was 7 * 5 = 35
that means the man is currently 37 years old and his son is 7.


3 years from now, the man will be 40 and his son will be 10.
40 / 10 = 4 which means that the man will be 4 times as old as his son.


looks like man is 37 years old and his son is 7.


two years ago, 35/5 = 7
3 years from now, 40/10 = 4
solution looks good.
solution is man is 37 years old and his son is 7.