Let T = Tyler's age
Then E is Elaine's age = T - 8
E + T = the sum of their ages = 34
Substitute:
(T - 8) + T = 34
Collect:
2T - 8 = 34
Add 8 to each side
2T = 42 => T = 21 and then E = T - 8 = 13
Take these values and make sure they work in the original problem.