hi pranav, it can be solved in the following way>>
let, Fair coin be "F"
unfair coin be "U"
and 3 heads be "3H"
P(F)=1/2 , P(U)=1/2
P(3H/f)=1/2 * 1/2 * 1/2 = 1/8
P(3h/U)=1*1*1= 1
NOW,
P(F/3H)= P(3H/F)* P(F)
--------------
P(3H/F)* P(F) + P(3H/U)* P(U)
= (1/8* 1/2)
---------------
(1/8*1/2)+ (1*1/2)
=1/9
:)