Let the events M,F and G be defined as follows:
M: A male is selected
F: A female is selected
G: A person has grey hair
It is given that the number of males = the number of females
P(M)=P(F)=12
Now, P(G/M)= Probability of selecting a grey haired person given that they are male =5%=5100
Similarly, P(G/F)=0.25%=0.25100
A grey haired person is selected at random, the probability that this person is a male =P(M|G)
=P(M)×P(G|M)P(M)×P(G|M)+P(F)×P(G|F) using Baye's theorem
=12×510012×5100+12×0.25100
=55.25=2021