I quite like to do these without algebra - I'll see if I can demonstrate my method.
the black numbers are the ones you have been given.
the ratio of boys to girls is 4:5 so in total there is some multiple of 9 students altogether.
Next you have to say
$$\begin{tabular}{|c|c|c|}\hline
boys & girls & Total\\\hline
4&5&\textcolor[rgb]{1,0,0}{4+5=9} \\\hline
& &1620\\\hline
\end{tabular}$$
$$\\\textcolor[rgb]{1,0,0}{1620\div 9 = 180} \quad $180 is the multiplication factor$\\
so\\
$number of boys is $4\times 180 = 720 \quad $Put that in the box under the 4$\\
and\\
$number of girls is $5\times 180 = 900 \quad $Put that in the box under the 5$\\\\
$Total number of $ \textcolor[rgb]{0,0,1}{ \;purple\;penguins\;} $ is $ 720+900=1620 $ that checks out very nicely. $
\\\\
$The purple penguins is an insider joke - don't worry if you don't get it - you can google it if you want, then you will know what I am talking about. $$$
.