Let's call the numbers x and y, with y being the smaller number.
x+y=34
x-6=y
You can set both of these equations equal to one variable to solve for the other. Using the first equation:
x+y=34
Subtract y from both sides.
x=34-y
Using the second equation
x-6=y
Add 6 to both sides.
x=y+6
Now, since both equations equal x, you can set them equal to each other:
34-y=y+6
Add y to both sides.
34=2y+6
Subtract 6 from both sides.
28=2y
Divide both sides by 2.
14=y
The smaller number (y) is 14. We can plug 14 into either of the above equations to solve for the larger number (x).
x+(14)=34
Subtract 14 from both sides.
x=20
You can check that the numbers are 14 and 20; they equal 34 when added and 14 is 6 less than 20.
The larger number is 20 and the smaller number is 14.
I hope this helps :)