Let n1 and n2 be the number of boys and girls, respectively.
Given, mean marks (out of 100) of boys (¯x1)=70
And mean marks ( out of 100) of girls (¯x2)=73
Also, given that, mean marks of all the students in the examination (¯x12)=71 [given]
∴70n1+73n2n1+n2=71
⇒70n1+73n2=71n1+71n2
⇒73n2−71n2=71n1−70n1
⇒2n2=n1
⇒n1n2=21 or n1:n2=2:1