We have two numbers that we will call x and y.
One number exceeds the other by 5, so we can express it as an equation like:

where y exceeds x by 5.
The sum of the squares is 157, so we can express this as:

We can replace y with the first expression and obtain:

We now have a quadratic equation.
We can solve it as:

We have two possible solutions: -11 and 6.
We can check both:
1) If x = -11, then y is -6, and the sum of the squares is 121 + 36 = 157, so it is valid.
2) If x = 6, then y is 11 and the sum of the squares will also be 157, so it is also a valid solution.
Answer:
If both numbers are positive, they are 6 and 11.
If negative numbers are allowed, the pair of numbers -11 and -6 is a valid solution too.