These two segments (DG and EH) should come out to be of equal distance.

The coordinates of D are (-2h, 0) and G are (h,k).
Using the distance formula I got the distance of DG to be the square root of 3h squared + k squared.
Using the distance formula I got the distance of EH to be -3h squared + k squared.
I know the two distances should be equal. I don't know why the second segment is coming out with that negative 3. I must have made a mistake somewhere... please help.