Fraction of students of class $$A$$ who passed in $$1st$$ class $$= \dfrac {20}{25} = \dfrac {4}{5}$$
Fraction of students of class $$B$$ who passed in $$1st$$ class $$= \dfrac {24}{30} = \dfrac {4}{5}$$
From both classes, an equal fraction of students passed in first class.