x + y + z = 24
z - 2 = 2x
z = x + y
So as z = x + y then we can substitute z in the first equation. This makes the first equation something like 2z = 24 and z = 12.
Now if z = 12 we can find x from the second equation. And x comes out to be 5 if we solve it.
Now finally y comes out to be 7 as z is equal to x + y.