You know that 1/3 of the class has dogs, out of those 1/3, 2/5 have beagles.
To determine the fraction of the class that has beagles, you have calculated 2/5 of 1/3, which can be done by multiplying 1/3 by 2/5:
[tex]\frac{1}{3}\cdot\frac{2}{5}=\frac{1\cdot2}{3\cdot5}=\frac{2}{15}[/tex]→ 2/15 of the class has beagles