You can put this solution on YOUR website! Since you know that DEFG is a square, you also know that both its diagonals are going to be equal. All you have to do here is set up an equation and solve it.
10-2x=2+2x
Subtract 2 from both like terms.
8-2x=2x
Add 2x to the other side to get the variable alone.
8=4x
Divide both sides by 4.
x=2
Hope this helps(: