You can
put this solution on YOUR website!diagonal is

in a right triangle, hypotenuse squared = width squared plus length squared.
in this rectangle, width = h + 2
in this rectangle, length = height = h
the diagonal of the gate is the hypotenuse of a right triangle.
your formula is:

where:
w is the width of the gate
h is the height of the gate
d is the diagonal of the gate.
-----
since you know that d =

, then d^2 must be equal to 6 meters because

-----
since you know that w = h+2, then you can substitute h+2 for w.
-----
your formula becomes:

-----
since:

your formula becomes:

combine like terms to get:

subtract 6 from both sides of the equation to get:

-----
solve using the quadratic formula to get:
h = .414213562 meters.
this makes:
w = 2.414213562 meters.
-----
this checks out because

-----
quadratic formula is:

the equation you are placing into this formula is:

the factors you will be using are:
a = 2
b = 4
c = -2
-----
you replace the a in the formula with 2.
you replace the b in the formula with 4.
you replace the c in the formula with -2.
-----
then you solve.
you will get one positive answer and one negative answer. the negative answer is no good because h = height can't be negative. only the positive answer is good. that value should be the value i calculated for you.
-----