solve algebraic equations

Let the first number be x. Then:

the second number becomes x+8.

Set up an equation: x+(x+8)=50 => 2x+8=50 => 2x=42 => x=21 => this is the first number (because this is what we set equal to x)

Second number = x+8 => 21+8=29