In a right triangle, the tangent of an angle is defined as the quotient between the length of the side opposite to the angle and the length of the side adjacent to the angle.
Nevertheless, that is only true when the triangle is a right triangle. If BCA is a right angle, then all the reasoning is correct. But we cannot assume that BCA is a right angle unless it is given or there is a way to prove it.
Therefore, the mistake resides in assuming that the triangle is a right triangle without prior proof.