Answer
$y=10$
Work Step by Step
Recall:
If $y$ varies directly as $x$, then $y=kx$ where $k$=constant of variation.
When $x=2$, the value of $y$ is $4$.
Substitute these values into the equation above to obtain:
\begin{align*}
y&=kx\\\\
4&=k(2)\\\\
4&=2k\\\\
\frac{4}{2}&=\frac{2k}{2}\\\\
2&=k
\end{align*}
Thus, the direct variation is $y=2x$.
To find $y$ when $x=5$, substitute $5$ to $x$ to obtain:
\begin{align*}
y&=2x\\
y&=2(5)\\
y&=10
\end{align*}