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.

To find the distance between two points in a coordinate plane using the distance formula, you need to use the absolute value of the differences between the components of the coordinates.

Let's first calculate the distance DG using the given coordinates: D(-2h, 0) and G(h, k).

The distance formula states that the distance between two points (x₁, y₁) and (x₂, y₂) is given by:

√((x₂ - x₁)² + (y₂ - y₁)²)

Applying this formula, we get:

DG = √((h - (-2h))² + (k - 0)²)
= √((h + 2h)² + k²)
= √(3h² + k²)

Now, let's calculate the distance EH using the given coordinates: E(-2h, 0) and H(0, k).

Similarly, applying the distance formula, we get:

EH = √((0 - (-2h))² + (k - 0)²)
= √((2h)² + k²)
= √(4h² + k²)

Notice that the distance formula does not give negative values. Therefore, the negative sign you have in front of the 3h² in the expression for EH is incorrect. The correct expression for EH is:

EH = √(4h² + k²)

To summarize, the distances DG and EH, respectively, are given by:

DG = √(3h² + k²)
EH = √(4h² + k²)

Based on these formulas, we can see that the two distances will be equal when:

√(3h² + k²) = √(4h² + k²)

Simplifying this equation, we have:

3h² + k² = 4h² + k²

By subtracting k² from both sides:

3h² = 4h²

Further subtracting 3h² from both sides:

0 = h²

This equation indicates that h must be zero for the two distances to be equal. If h is not zero, then DG and EH will not have the same value.