Answer: peter is 19 and Sylvia is 9
Explanation:
lets say p= Peter
and s=Sylvia
4 years ago, the equation is p-4= 3(s-4) because peter was 3 times older than sylvia 4 years ago which is why you have to multiply sylvia's current age by 3
when you simplify the equation you're left with p-4= 3s-12
when you solve for p, it equals 3s-8 (p=3s-8)
you substitute that as peter's age so you can end up with the same variable.
in 5 years the equation would be p+5+s+5=39 but since you need the same variable, you insert p=3s-8 as peter's age.
then you get the equation, 3s-8+5+s+5=38
when you simplify that you get, 4s+2=38
solve for s and you get 9 (s=9)
that means Sylvia is 9 years old
but we still need to find peter's age
you can choose to use either one of the equations to find out peter's age since you now know sylvia's
4 years ago:
9-4=5 subtract from sylvia's current age
5*3=15 because peter is 3 times older back then
15+4=19 because you need to find his current age