Marc spent 1/3 of the time doing Algebra, another 1/3 (which is the same as 2/6) doing English, and the rest (which is also 1/3) reading a book. So if the last 1/3 was 10 minutes, that means that he was in class for 30 minutes.
The 2nd example, the answer is 40. He has now 25, he spend 25% (that's 1/4) of what he had, and also 12.5% (that'a an 1/8) of what he had. 1/4 = 2/8. So 2/8 + 1/8 = 3/8. So he's left now with 5/8 of what he had. If 5/8 = 25, then 8/8 = 40.