Well, say the amount of Tim's apples is equal to Variable X, then you just have to solve this equation:
$${\frac{\left({\frac{\left({\mathtt{3}}{\mathtt{\,\times\,}}{{\mathtt{x}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{x}}{\mathtt{\,-\,}}{\mathtt{10}}\right)}{\left({{\mathtt{x}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{4}}{\mathtt{\,\times\,}}{\mathtt{x}}{\mathtt{\,\small\textbf+\,}}{\mathtt{4}}\right)}}\right)}{\left({\frac{{\mathtt{1}}}{{\mathtt{x}}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{2}}\right)}} = {\sqrt{{\mathtt{625}}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{30}}$$
Then, Tim's apples teleport into your hands, so Tim has 0 apples. XD
Well, say the amount of Tim's apples is equal to Variable X, then you just have to solve this equation:
$${\frac{\left({\frac{\left({\mathtt{3}}{\mathtt{\,\times\,}}{{\mathtt{x}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{x}}{\mathtt{\,-\,}}{\mathtt{10}}\right)}{\left({{\mathtt{x}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{4}}{\mathtt{\,\times\,}}{\mathtt{x}}{\mathtt{\,\small\textbf+\,}}{\mathtt{4}}\right)}}\right)}{\left({\frac{{\mathtt{1}}}{{\mathtt{x}}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{2}}\right)}} = {\sqrt{{\mathtt{625}}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{30}}$$
Then, Tim's apples teleport into your hands, so Tim has 0 apples. XD