muhum hum....
Let
Sally's age = s
Tomas's age = t
The sum of sally's age plus twice tomas's age is 12
s+2t=12...........(1)
The difference of sally's age and tomas' is 3.
s-t=3
s=3+t.........(2)
Put the value of s from (2) to (1)
s+2t=12...........(1)
3+t+2t=12
3t=12-3
3t=9
t=9/3
t=3
Put the value of t in (2)
s=3+t
s=3+3
s=6
Sally's age = s = 6
Tomas's age = t = 3