Since y varies directly with x, we have the following relation:
[tex]\frac{y}{x}=k[/tex]Where k is a constant.
For y = 8 and x = 4, we have:
[tex]\begin{gathered} \frac{8}{4}=k \\ k=2 \end{gathered}[/tex]Then, for y = 10, we have:
[tex]\begin{gathered} \frac{10}{x}=2 \\ x=\frac{10}{2} \\ x=5 \end{gathered}[/tex]So for y = 10 we have x = 5.