You can start by making 2 equations to simulate the problem.

Then you can subsitute the second into the y of the first equation like so:

Then you can add 24 on both sides and get:

From here you can divide by 3 on both sides and get:

After that you want to plug this x into one of the equations. I will do the second since it is simpler.

Thus, the two numbers are 50 and 76.