When the coin is tossed trice, the possible outcomes are HHH,HHT,HTH,HTT,THH,THT,TTH,TTT.
Total number of possible outcomes =8.
a) Let A be the event of getting exactly 2 heads. Then, the favourable outcomes are HHT,HTH,THH, which is equal to 3. That is, the number of favourable outcomes =3.
Therefore P(A)=38.
b) Let B be the event of getting at most 2 tails.
Then B= the event of getting 1 or 2 tails.
The favourable outcomes are HHH,HHT,HTH,HTT,THH,THT,TTH.
The number of favourable outcomes =7.
Therefore P(B)=78.