so, she has 30 messages, and 1/5 of those are pictures, now, a whole will be 5/5, so if 1/5 are pictures, then the other 4/5 are the remainder.
how much is 4/5 of 30? well, is just their product, 30(4/5) => 24.
now, of the remainder, 7/8 are text messages, well the remainder is 24, how much is 7/8 of 24? same, is their product, 24(7/8) => 21.