Triangles P and Q are similar. Find the lengths of the sides

Answers:
==========================================================
Explanation:
In triangle P, aka triangle ABC, we have the color coded angles:
For triangle Q, aka triangle XYZ, we have:
The colors must pair up to match together. The order is important. That order being "blue, purple, red".
Because of this, we have the three pairs of congruent angles:
Furthermore, that extends to having these pair of corresponding sides that match up together:
-----------------------
Side AC = 7 involves the blue and red angles. The same applies to XZ = 21.
The jump from 7 to 21 is "times 3", which tells us the scale factor. The triangle XYZ has side lengths 3 times longer compared to triangle ABC.
We'll use this scale factor to determine the missing sides of each triangle.
-----------------------
Side BC = 5 involves the purple and red angles. For the other triangle, side ZY involves those same color angles. Going from BC = 5 to ZY = unknown will involve the "times 3" operation. So we have,
ZY = 3*BC = 3*5 = 15
-------------------------
Side AB = unknown pairs up with side XY = 27 of the other triangle. Each side mentioned involves the blue and purple angles.
Instead of multiplying, we'll do the opposite: we divide 27 by 3 to get the side of AB.
This is because:
XY = 3*AB
AB = XY/3
AB = 27/3
AB = 9