If $x=a$, consider the sequence $(a_{n})=(a+\frac{b-a}{2}\frac{1}{n})_{n\geq 1}$ and the sequence $(b_{n})(b+\frac{b-a}{2}\frac{1}{n})_{n\geq1}$. We define $f$ as follows
$$f(x)=\begin{cases}b+\frac{b-a}{2}\frac{1}{2n-1}&\text{ if }x=a+\frac{b-a}{2}\frac{1}{n},\ n>0.\\ b+\frac{b-a}{2}\frac{1}{2n}&\text{ if }x=b+\frac{b-a}{2}\frac{1}{2n},\ n>0.\\2b-a+\frac{b-a}{2}\frac{1}{n}&\text{ if }x=b+\frac{b-a}{2}\frac{1}{2n-1},\ n>0.\\x+b-a&\text{ else}.\end{cases}$$
Note that $f$ is well-defined as for all $m,n\in\mathbb{N}$ we have
\begin{align*}|a+\frac{b-a}{2}\frac{1}{m}-b-\frac{b-a}{2}\frac{1}{n}|&=|a-b+\frac{b-a}{2}\frac{n-m}{mn}|\geq|a-b|-|\frac{a-b}{2}||\frac{1}{m}-\frac{1}{n}|\\&\geq|a-b|-\frac{1}{2}|a-b|>0\end{align*}
Using similar arguments we find that
$$f^{-1}(x)=\begin{cases}a+\frac{b-a}{2}\frac{1}{n}&\text{ if }x=b+\frac{b-a}{2}\frac{1}{2n-1},\ n>0.\\b+\frac{b-a}{2}\frac{1}{2n} &\text{ if }x=b+\frac{b-a}{2}\frac{1}{2n},\ n>0.\\b+\frac{b-a}{2}\frac{1}{2n-1}&\text{ if }x=2b-a+\frac{b-a}{2}\frac{1}{n},\ n>0.\\x+a-b&\text{ else}.\end{cases}$$
is well-defined, and evidently $f^{-1}$ is the inverse of $f$. So $f$ is bijective.
Now let $\varepsilon>0$ and take $\delta=\min(\varepsilon,\frac{b-a}{2})$. For all $x\in\mathbb{R}$ with $|x-a|<\delta$ we have $|f(x)-f(a)|\leq|x+b-a-b|=|x-a|<\varepsilon$. So $\lim_{x\rightarrow a}f(x)=b$.
Furthermore note that $\lim_{n\rightarrow\infty}f^{-1}(b+\frac{b-a}{2}\frac{1}{2n})=b\neq a$, so $\lim_{x\rightarrow b}f^{-1}(x)\neq a$.
For $a=b$ one can actually (contrary to my previous claim) define a similar function. We define
$$f(x)=\begin{cases}a+\frac{1}{2n}&\text{ if }x=a+\frac{1}{n},\ n>0.\\a+\frac{1}{2n-1}&\text{ if }x=a+2+\frac{1}{2n-1},\ n>0.\\a+2+\frac{1}{n}&\text{ if }x=a+2+\frac{1}{2n},\ n>0.\\x&\text{ else}.\end{cases}$$
Using similar arguments we find that $f$ is bijective $\lim_{x\rightarrow a}f(x)=a$, but $\lim_{n\rightarrow \infty}f^{-1}(a+\frac{1}{2n-1})=a+2\neq a$.