we can write the sum of two numbers like this:

and their difference like this:

then,in this case, we have the following system of equations:

If we add both of them together we get the following:

now that we have the value of x, we can use it on any equation to find the value of y:

therefore, x = 503 and y = 248