Let E1, E2 and A be events such that
E1 = students is a hostler
E2 = students is a day scholar
A = getting A grade
Now from equation,
P(E1) = 60/100 = 6/10
P(E2) = 40/100 = 4/10
P(A|E1) = 30/100 = 3/10
P(A|E2) = 20/100 = 2/10
We have to find P(E1|A)
Now, using Bayes' theorem,
P(E1|A) = P(A|E1)P(E1) / [P(A|E1)P(E1) + P(A|E2)P(E2)]
= (6/10)(3/10) / [(6/10)(3/10) + (4/10)*(2/10)]
= 18/100 / (18/100 + 8/100)
= 18/100 / 26/100
= 18/26
= 9/13