Step-by-step explanation:
Let the number of milk chocolates be [tex]m[/tex].
Let the number of dark chocolates be [tex]d[/tex].
Given that the box contains the milk and dark chocolates in the ratio [tex]3:4[/tex].
So,[tex]\frac{m}{d}=\frac{3}{4}[/tex] ...(i)
Given that the total number of chocolates are [tex]42[/tex].
So,[tex]m+d=42[/tex]. ...(ii)
Using (i) and (ii),
[tex]m+\frac{4}{3}m=42[/tex]
[tex]\frac{7}{3}m=42[/tex]
[tex]m=18[/tex]
[tex]d=\frac{4}{3}m=\frac{4}{3}\times 18=24[/tex]
So,the number of milk chocolates are [tex]18[/tex] and the number of dark chocolates are [tex]24[/tex].