How do I describe the following function
$f(-1)=f(1)=0$ $f^{\prime}(x) =1$ on $[a,b]^{c}$ and $f \in C^{1}[-1,1]$. In blue, I know $f(x) = x+1$ on $[-1,a)$ and $f(x) = x-1$ on $(b,1]$. I can't get the green part. The design is not so cool, but that's the idea, a function that is $C^{1}[-1,1]$, so there has to be a little curve coming out of $a$ and a little curve arriving at $b$, the path can be in any way as long as it is continuous.

No, I actually meant what I wrote.
To solve this problem, there are several things you can do:
You could try a polynomial function of minimal degree. First, you can try a function of the form $\alpha x+\beta$, but you will soon see this does not work. Then, you could look at something of the form $\alpha x^2+\beta x+\gamma$, which is essentially what geetha suggested. Unfortunately, we found that this does not work either. Then, we can look at a function of the form $\alpha x^3+\beta x^2+\gamma x+\delta$. But to make things easier, we instead look at $$\alpha (x-a)^3+\beta (x-a)^2+\gamma (x-a)+\delta.$$
Now $f(a)=1+a$ gives $\delta=1+a$ and $f'(a)=1$ gives $\gamma=1$, so we arrive at $$f(x) = \alpha (x-a)^3+\beta (x-a)^2+x+1.$$
(Note how the $a$ in the $\delta$ term and the $a$ in the $\gamma$ term cancel each other out)
Solving the equations $f'(b)=1$ and $f(b)=b-1$ gives $3\alpha(b-a)^2+2\beta(b-a)=0$ and $\alpha(b-a)^3+\beta(b-a)^2+2=0$ respectively, which you can then solve for $\alpha$ and $\beta$. It gives $$f(x)=4\left(\frac{x-a}{b-a}\right)^3-6\left(\frac{x-a}{b-a}\right)^2+x+1$$
Alternatively, you could do something with smooth transition functions or smoothstep functions. If $g(x)$ is any sufficiently smooth function such that $g(x)=0$ for $x\leq0$ and $g(x)=1$ for $x\geq1$, you could take $$f(x)=(x-1)g\left(\frac{x-a}{b-a}\right) + (x+1)\left(1-g\left(\frac{x-a}{b-a}\right)\right)$$