The sum of the squares of a number and 4 is equal to the sum of the squares of the number and 2

The sum of the squares of a number and 4 is equal to the sum of the squares of the number and 2

Let this number be X
x^2+4^2=(x+2)^2
Simplify
4x=12
The solution is x = 3
So, the number is 3