Well, we know that if two polygons are similar, then their sides are proportional. Therefore, side AB is similar to side XY and side BC is similar to side YZ. This means that AB / XY = BC / YZ. From here, plug in values: 15 / XY = 40 / 8. This can be simplified to 15 / XY = 5. Multiply both sides by XY to get it out of the denominator: 15 = 5XY and then divide each side by 5. 3 = XY. This means that the answer is B, or 3 units. To check the answer, put it back into the original equation and make sure it works out.
Hope this helped!!! :)