I would like to know if my solution is correct. Thanks in advance.
Consider $f_n(x)=\log(\frac{nx^2+1}{n+1})$ with $x\in \mathbb{R}$ and $n\ge 0$.
Determine the set S where $(f_n)_n$ converges pointwise and for which $r\ge0$ it converges uniformly on $B_r=[-r,r]^c \cap S$.
$f_n(x)\to \log(x^2)=:f(x)$ if $x\ne0$ and $f_n(0)\to -\infty$, so $S=\mathbb{R}-\{0\}$.
Now take $r\gt0$, $||f_n-f||_{B_r}=\sup_{|x|>r}|f_n(x)-f(x)|=\sup_{x>r}|\log(\frac{n+1/x^2}{n+1})|=\max(|\log\frac{n}{n+1}|, |\log(\frac{n+1/r^2}{n+1})|) \to 0$ when $n \to \infty$.
Therefore $(f_n)_n$ converges uniformly on every $B_r$ with $r>0$.
If $r=0$, then $||f_n-f||_{B_0}=\max(\log(1+1/n), +\infty)=+\infty$ that does not converge to zero, so there is not uniform convergence.
Edit:
the function $x \to \log(\frac{n+1/x^2}{n+1})=\log(n+1/x^2)-\log(n+1)$ defined on $(r, \infty)$ is decreasing (because $1/x^2$ is, and log is increasing).
So its extrema are $M_1=\log(n)-\log(n+1)=\log(n/(n+1))$ (for $x\to +\infty$) and $M_2= \log(\frac{n+1/r^2}{n+1})$ if $r>0$ or $M_2=+\infty$ if $r=0$ (for $x\to r^+$ ).
From this follows the 'max' reasoning above.
You have the right idea, but your execution is sloppy and hand-wavy. I suggest you use more caution and rigor when proving things, and write justification for any non-trivial step in the process you make.
For $r>0$, your answer looks OK, but needs some clarification. How do you know that the equality
$$\sup_{x>r}\left|\log\left(\frac{n+1/x^2}{n+1}\right)\right|=\max\left(\left|\log\frac{n}{n+1}\right|, \left|\log(\frac{n+1/r^2}{n+1})\right|\right)$$
is true?
For $r=0$, where is your basis for claiming $||f_n-f||_{B_0}=\max(\log(1+1/n), +\infty)$?
For $r=0$, a much more elegant way of showing that uniform convergence is not possible is by showing that the expression $\|f_n(x)-f(x)\|_{B_0}$ becomes arbitrarily large as $x$ approaches zero. No need for a maximum of two numbers, where one magically becomes $\infty$.