Full working ...
Let Sam's current age be x and his teacher's be y
> after three years sam's teacher will be six times older than Sam was last year
This gives us
6(x-1) = y+3
> the sum of Sam and his teacher's current age is 68
This gives us
x+y = 68
We therefore have simultaneous equations to solve:
1) 6(x-1) = y+3
2) x+y = 68
From 1):
3) 6x - 6 = y + 3
From 2):
4) x = 68 - y
Add 3) and 4):
6x - 6 + x = y + 3 + 68 - y
7x -6 = 71
7x = 77
Therefore
5) x = 11
Substitute 5) back into 2):
11+y = 68
Therefore
6) y = 57
Check x and y in 1):
6(11-1) = 57+3
6 x 10 = 70 correct
Therefore the current ages are 11 and 57
> What will be their ages after five years?
16 and 62