Let G denote the event the examine guesses, C the event that the examinee copies and K the event that the examinee knows. Let R denote the event that the answer is right. We have
P(G)=13,P(C)=16
and P(K)=1−13−16=12
Also,
P(R|G)=1m,P(R|C)=18,P(R|K)=1.
By Bayes' rule
P(K|R)=24m16+25m=120141⇒m=5