Two numbers total 12, and their difference is 18. Find the smaller of the two numbers.

If you can, please show me how you did it because I can not figure this out

x + y = 12

x - y = 18 add these

2x = 30 divide both sides by 2

x = 15

And using x + y = 12 we have

15 + y = 12 subtract 15 from both sides

y = -3

So (x,y) = (15, -3) ⇒ the smaller number is -3