Triangles ABC and DEF are similar, which means corresponding sides occur in ratios with one another. Mathematically, this means

Also, corresponding angles are congruent. These are A and D, B and E, C and F.
As an example, for 21, the above equation turns into

and you can solve for
and
directly:


The others are solved exactly the same way. In each case, you happen to be given all the side lengths for one of the triangles, and one of the side lengths for the other triangle. So all you need to do is plug in what you know and solve for the remaining two sides.