I have the question:
In the triangle $\triangle ABC$, $AC=BC$, $AH$ is the height, $\tan(\angle BAC) = \frac{24}{7}$. Find the length $AB$.
1.I found, that $\cos(\angle BAC) = \frac{7x}{25x}$.
2.Also, I find that $\cos(\angle BAC) = \cos(\angle ABC)$. $\cos(\angle ABC) = \frac{HB}{AB}$. Hence, $\frac{7x}{25x} = \frac{HB}{AB}$. Hence, $AB=25x$.
3.But, if I try to find this with $\tan(\angle BAC)$, I need to draw the height $CK$. Then, I know, $\tan(\angle BAC) = \frac{CK}{AK}$. Hence, $\frac{24x}{7x} = \frac{CK}{AK}$, so $AK=7x$. Hence $AB=AK \cdot 2$. $AB=14x$.
Why did I get this answer? Where is my mistake?
Consider the diagram below:
We are given $\overline{AH}$ is an altitude of $\triangle ABC$, $AC = BC$, and $\tan\angle BAC = 24/7$.
Since $\overline{AC} \cong \overline{BC}$, $\angle BAC \cong \angle ABC$ by the Isosceles Triangle Theorem. Hence, $$\tan\angle BAC = \tan\angle ABC = \frac{AH}{BH} = \frac{24}{7}$$ If we let $BH = 7x$, as you did, then $AH = 24x$. By the Pythagorean Theorem, \begin{align*} AB^2 & = AH^2 + BH^2\\ & = (24x)^2 + (7x)^2\\ & = 576x^2 + 49x^2\\ & = 625x^2 \end{align*} Since $x > 0$, taking the square root of each side of the equation yields $$AB = 25x$$ Hence, $$\frac{AB}{AH} = \frac{25x}{24x} = \frac{25}{24} \implies AB = \frac{25}{24}AH$$ from which you could determine the length of $AB$ if you knew $AH$.
What did you do wrong?
In your first calculation, you let $BH = 7x$ and $AB = 25x$, which implies that $AH = 24x$.
In your second calculation, you let $AK = 7x$ and $CK = 24x$. You should have used a different variable such as $y$ rather than $x$ since you have not proved that $AK = BH$ or that $AH = CK$. The scale drawing below illustrates why you should have set $AK = 7y$ and $CK = 24y$. In fact, if $AB = 25x$, then $AK = \frac{AB}{2} = \frac{25x}{2}$ and $CK = \frac{24}{7} \cdot AK = \frac{600x}{14} = \frac{300x}{7}$.