Let's make 2 equations.
A+B=334
A= 7B-18
Let's replace a in the first equation with the second equation.
7B-18+B=334
Simplify.
8B-18=334
add 18 to both sides.
8B= 352
Divide.
352÷8
44
So, one number is 44. Let's put 44 for B in the first equation in order to find a.
A+44=334
334-44
290
So a equals 290. Let's make sure by using the second equation.
7(44) - 18
308-18
290
One number equals 44, while another number equals 290.