You can reduce the percentages to fractions:
[tex] 25\% = \dfrac{25}{100} = \dfrac{1}{4} [/tex]
[tex] 40\% = \dfrac{40}{100} = \dfrac{2}{5} [/tex]
So, we have
[tex] 25\% \text{ of } 60 = \dfrac{1}{4}\cdot 60 = 15 [/tex]
[tex] 40\% \text{ of } 30 = \dfrac{2}{5}\cdot 30 = 12 [/tex]