Light the first rope at both ends and the second at one end, at the same moment. The first burns out in exactly 30 minutes, however unevenly, because the two flames meet. Light the other end of the second then, and it burns out 15 minutes later.