So with this you'll be doing a system of equations. The first equation is to represent the sum of the numbers and the second is to represent the difference of numbers.
Let x = larger number and y = smaller number.
x + y = 51
x - y = 9
For this, I'll be using the elimination method. And to do that, all you need to do is add (x+y=51) and (x-y=9) together, and your result will be 2x = 60. From here we can solve for x.
For that equation, all you need to do is divide 2 on both sides, and your answer will be x = 30.
Now that we have x, we can substitute x for 30 in either equation to solve for y. I'll use the 1st equation.
30 + y = 51
y = 21
In short, the two numbers are 21 and 30.