My answer is nearly right, except for the sign. Can anyone help me out here?

Many thanks.The diagram (see attachment) shows a triangle of height h metres. The angles A & B are such that $\displaystyle A+B=45^{\circ}$. By using the expansion of $\displaystyle \tan (A+B)$, or otherwise, find the value of h.

Q.

Attempt:$\displaystyle \tan 45^{\circ}=1$

$\displaystyle \tan (A+B)=\frac{\tan A+\tan B}{1-\tan A\tan B}=1$

$\displaystyle \frac{(h/2)+(h/3)}{1-(h/2)(h/3)}=1$

$\displaystyle \frac{h}{2}+\frac{h}{3}=1-\frac{h^2}{6}$

$\displaystyle \frac{h^2}{6}+\frac{h}{2}+\frac{h}{3}-1=0$

$\displaystyle h^2+3h+2h-6=0$

$\displaystyle h^2+5h-6=0$

$\displaystyle (h-1)(h+6)=0$

h = 1 or -6

Ans.:(From text book): h = 6