Sam is three times Bob’s age increased by 9. The sum of Sam and Bob’s age is 49, find their ages.

S = 3 B + 9

S + B = 49 ... S = 49 - B

substituting ... 49 - B = 3 B + 9

solve for B , then substitute back to find S