This is a system of 3 linear equations. I don't think systematic ways of solving are the way to go here. Instead, notice that we can eliminate r from the last equation by subbing in: r = 15 + s:
r + s + b = (15 + s) + s + b = 42
Now, we can eliminate b by subbing in from the second equation:
Okay i did this in my head so bert is 17 sam is 5 and ray is 20. It seems correct to me but in tired and i did it in my head so you should double check
Answers & Comments
Verified answer
Let Sam's age be x years
Ray = x+15 years
Bert = x +12 years
ADD 3x +27 = 42
3x = 15
x = 5
ANSWER Sam = 5 years Ray = 20 years Bert = 17 years
CHECK
5+20+17 = 42 years
r: age of Ray
s: age of Sam
b: age of Bert
r = 15 + s: Ray is 15 years older than Sam
s = b - 12: Sam is 12 years younger than Bert
r + s + b = 42: Their ages total 42
This is a system of 3 linear equations. I don't think systematic ways of solving are the way to go here. Instead, notice that we can eliminate r from the last equation by subbing in: r = 15 + s:
r + s + b = (15 + s) + s + b = 42
Now, we can eliminate b by subbing in from the second equation:
s = b - 12 --> b = s + 12
--> plug in to summation
(15 + s) + s + (s + 12) = 42
--> simplify
3s + 27 = 42
--> subtract 27
3s = 15 --> s = 15/3 = 5
Now, b = s + 12 = 5 + 12 = 17
r = 15 + s = 15 + 5 = 20
So Sam is 5 years old, Bert is 17, and Ray is 20.
Ray = x
x-15 = Sam
x-3 = Bert
x + x - 15 + x - 3 = 42
3x - 18 = 42
3x = 60
x=20
Ray = 20
Sam = 20-15 = 5
Bert = 20-3=17
20, 5, 17
Ray is 20
Sam is 5
Bert is 17
Okay i did this in my head so bert is 17 sam is 5 and ray is 20. It seems correct to me but in tired and i did it in my head so you should double check