The problem:
A straight line is drawn through the point of intersection of the diagonals of a trapezoid, which is parallel to the bases and intersects the sides of the trapezoid at points $M$ and $K$. Find the segment $MK$, if the bases of the trapezoid are equal to $a$ and $b$.
The drawing:
A valid solution:
$a \parallel b \implies \angle XBC = \angle XDA, \space \angle XCB = \angle XAD \implies \triangle BXC \sim \triangle DXA \implies \frac{a}{b} = \frac{c}{d} = \frac{e}{f}$
$\triangle AMX \sim \triangle ABC \implies \frac{g}{a} = \frac{f}{f + e} \implies g = \frac{af}{f + e} \implies g = \frac{a}{1 + \frac{e}{f}} \implies g = \frac{a}{\frac{b + a}{b}} \implies g = \frac{ab}{a + b}$
By repeating the second step, but only with the $h$ segment, I arrive at $h = \frac{ab}{a + b}$ just as well.
$MK = g + h, \space g = h \implies MK = \frac{2ab}{a + b}$
This solution I've found on the internet and the answer matches the answer to the problem in the textbook, where this problem is from.
This solution uses one of the properties of triangles similarity, and the issue is that in the textbook one is allowed to solve this problem only by a triangles similarity lemma(two triangles are similar when all the angles are pairwise equal and the sides of the triangles are pairwise proportional). And I can't figure the solution out, without somehow using or proving the first triangles' similarity property.
