I'm not totally sure, but just doing it in my head:
BC = 15 cm
AB = 12.5 cm
and it's spelled "equilateral" for future reference :)
Sorry, here's the explanation:
So, start with triangle ABC. You know that an isosceles triangle has a base, and two equal sides. This means that once you subtract the side BC from the perimeter, you have the length of the other two equal sides combined meaning that if you divide that by 2, you will have the length of one of the equal sides, AB for example. Moving to the equilateral triangle, BCD. You know that with equilateral triangles, all sides are equal. The perimeter is 45, and because equilateral triangles have 3 equal sides, you divide 45 by 3, getting 15. Here it might help to draw a picture, but BC is one of the sides of your equilateral triangle meaning that BC is equal to 15. Then you move back to ABC. Remember what we said before, that once you subtract BC from ABC you get the sum of the other two equal sides. So, 40 - 15 is 25. Then, because there are two equal sides, you divide 25 by 2, getting 12.5 and that's the length of your other two side, AB and AC.