n2 = (n + x)(n - x) + x2

Try it. It works.

Example: n = 19, x = 3

192 = (19 + 3)(19 - 3) + 32
361 = (22 x 16) + 9
361 = 352 + 9
361 = 361

More fun. n = 8; x = 50

82 = (8 + 50)(8 - 50) + 502

64 = (58 x -42) + 2500
64 = -2436 + 2500
64 = 64

See!

Finally, n = 7, x = 7

72 = (7 + 7)(7-7) + 72 (as you can see, we don’t even have to solve 72 to prove this one…):

72 = (49 x 0) + 72
72 = 72
49 = 49 (…but we will anyway)