If the number is n, n²+(n+5)²=227, n²+n²+10n+25=227, 2n²+10n-202=0, n²+5n-101=0.
This can be written: n²+5n+25/4=101+25/4, (n+5/2)²=429/4=10.3562 approx.
So n=10.3562-2.5=7.8562 approx.
If the sum had been 277, the answer would have been rational:
If the number is n, n²+(n+5)²=277, n²+n²+10n+25=277, 2n²+10n-252=0, n²+5n-126=0=(n+14)(n-9).
So n=9. Please check your question. I think the sum should have been 277, not 227.