Question:
I'm trying to find inverse of $f(x) = \frac{x^3+2}{x-3}$ for an assignment.
$y = \frac{x^3+2}{x-3}, x\neq3$
Replace $x$ and $y$.
$x = \frac{y^3+2}{y-3}$
$x(y-3) = y^3 + 2$
$xy - 3x = y^3 + 2$
I don't know how to proceed after this. Ideally I want to get $y = \text{(in terms of x)}$. But I can't seem to do that due to term $xy$ and lack of other common factors. Please help!
If $x\neq 3$ $$y= \frac{x^3+2}{x-3}\quad \implies \quad x^3-y \,x+(3y+2)=0$$ For $y>0$, following the steps given here, we have $$\Delta=4 y^3-27 (3 y+2)^2$$ which is negative; so, only one real root.
Using the hyperbolic solution for one real root, we end with $$x=-\frac{2 \sqrt{y} }{\sqrt{3}}\cosh \left(\frac{1}{3} \cosh ^{-1}\left(\frac{ 3\sqrt{3}}{2}\frac{ (3 y+2)}{y\sqrt y}\right)\right)$$
If you dont know the solution of cubic equations, there is more likely a typo in the textbook. It is not impossible the the problem was in fact $y= \frac{x^\color{red}{\large 2}+2}{x-3}$ (as you wrote in the first version of the post).