In order to find an oblique asymptote, we need to find some function $\phi(x)=kx+n$ or in other words, to find $k$ and $n$. Finding $n$ is pretty straightforward: $$ \begin{align*} \lim_{x \rightarrow \infty}(f(x)-\phi(x))&=0 \\ \lim_{x \rightarrow \infty}(f(x)-kx-n)&=0 \\ \lim_{x \rightarrow \infty}(f(x)-kx)&=n \end{align*} $$ Of course, in order to find $n$, we need $k$ first: $$ \begin{align*} \lim_{x \rightarrow \infty}(f(x)-\phi(x))&=0 \\ \lim_{x \rightarrow \infty}(f(x)-kx-n)&=0 \ \ \text\ \cdot \frac{1}{x} \\ \lim_{x \rightarrow \infty}\left( \frac{f(x)}{x}-k-\frac{n}{x} \right)&=0 \\ \lim_{x \rightarrow \infty}\left( \frac{f(x)}{x} \right)&=k \end{align*} $$ Where $\frac{n}{x}$ tends towards $0$ and we get the formula for $k$.
Question: Are we allowed to divide the whole equation by $x$ in the second step, and if not, why?
I found other similar questions and answers and another way to derive the formula but my professor showed me this one and was confused about it so I'm just wondering why,what's wrong with it.