The first one is solved by realizing that the student gets 3 correct and two incorrect, that the probability of a correct answer on any one question is 1/4, and the probablilty of an incorrect answer is 3/4. The right and wrong answers can be arranged in any one of 5C2 ways. So you get:

5C2*(1/4)^3 * (3/4)^2 = 10*9/1024 = 45/512.

For the second problem: there are 4 reds and 10 total, so the probability of pulling a red on the first draw is 4/10. If you put that red one back and draw again, the probablity of drawing red a second time is also 4/10. But if you don't replace it, then for the second draw there are only 3 reds out of the 9 that are left, so the probability of a second red is 3/9. Putting it together:

a) prob of two reds in a row with replacement = 4/10 * 4/10 = 4/25.

b) prob of two reds in a row without replacement = 4/10 * 3/9 = 2/15.