Question: I have the following question:
If $X$ is a continuous random variable that is uniformly distributed on the interval $(1,2)$ what is the distribution function of $Y=X+\frac{2}{X}?$\
I have tried to calculate the inverse of the function $f(x)=x+\frac{2}{x}$ but didn't manage to complete the calculation. Any ideas?

Answer: 
Because the coefficients are palindromic (read the same backwards as forwards), whenever $x=a$ is a solution of the equation, so is $x=\frac 1a$.

Thus the roots will be $x=\pm 1$ (which are easily identified and factored out) or come in pairs which will give factors of the form $$(x-a)(x-\frac 1a)=x^2-(a+\frac 1a)x+1$$If we set this equal to $0$ and rearrange we get $x+\frac 1x=a+\frac 1a$, from which we see that if we substitute $y=x+\frac 1x$ these two factors become a linear factor in $y$. Once you have the value of $y$ it is a simple matter of solving a quadratic to find the roots of the original equation.

"The substitution works" is one justification, but I hope this gives an idea as to why it works.
The idea here is to find some change of variable which makes the equation easier to solve. We might have guesses as to what to change, but we know we were right only if it ends up working out.

Here, you might guess to substitute $t = x + \frac{1}{x}$ because there are four different powers of $x$ in the equation -- $x^2$, $x$, $x^{-1}$, and $x^{-2}$ -- and this substitution lets us combine $x$ and $x^{-1}$ into $t$, and hopefully $x^2$ and $x^{-2}$ into $t^2$, so that we'll only end up with two different powers of $t$, which is much easier to solve.

So let's try it and see how it works out.

From $t = x + \frac{1}{x}$ we compute $t^2 = (x + x^{-1})^2 = x^2 + x^{-2} +2$. So $x^2 + x^{-2} = t^2 - 2$. This is good because $x^2 + x^{-2}$ appears in our equation.

Our main equation is (rewritten to show where we will substitute):
$$ (x^2 + x^{-2}) + (x + x^{-1}) - 10 = 0 $$
(The $10$ is still there, we just won't substitute for it.) We now place our substitutions:
$$ (t^2 - 2) + (t) - 10 = 0$$
$$ t^2 + t - 12 = 0$$
And now we can proceed to solve for $t$.