So I'm stuggling understanding what's going on with the following questions/solutions:

Two dice are rolled. What is the probability that:

(a) Event A: A 4 was rolled

P[A] = P[1st is only a 4] + Pr[2nd is only a 4] + P[both are 4]

= 1*5/36 + 5*1/36 + 1*1/36 = 11/36

(b) Event B: A prime number was rolled

P[B] = Pr[1st only prime] + Pr[2nd only prime] + Pr[both prime]

= 3*3/36 + 3*3/36 + 3*3/36 = 27/36

I don't understand why how the calculations are coming about. In a) I don't understand how the 5/36's are appearing. I'm completely lost in b).

Thanks for you help!