What you did is correct, except that you stopped short: $y=18$ is also possible. You could also have rewritten the equation as $5y=90-2x$, so $y=\frac{90-2x}5=18-\frac{2x}5\;.$ This implies that $x$ must be a multiple of $5$, so you get $x=0,5,10,15,20,25,30,35,40$, and $45$.
You can reduce the work by noticing that in the equation $x=\frac{90-5y}2=45-\frac{5y}2\;,$ $x$ decreases when $y$ increases. The smallest permissible value of $y$ is of course $0$, and as you saw, $y$ must be even. With just a little more work we determine directly what the largest possible value of $y$ is, and then we don’t have to try values one by one. The smallest permissible value for $x$ is $0$, so we must have $\begin{align*}&45-\frac{5y}2\ge 0\;,\\\\ &45\ge\frac{5y}2\;,\\\\ &5y\le90\;,\text{ and finally}\\\\ &y\le18\;. \end{align*}$
Thus, we know that $y$ can only be one of the numbers $0,2,4,\dots,16,18$.