First, notice that two angles of the smaller triangle are congruent to two angles of the bigger triangle. Therefore, by the Angle-Angle Similarity Theorem these triangles are similar.
△_(Smaller) ~ △_(Bigger)
We are given the lengths of the altitudes of the triangles. Recall that if two triangles are similar, the lengths of their corresponding altitudes are proportional to the lengths of their corresponding sides. Therefore, we can write the following proportion.
18/25 = 21/x
Let's solve it!