If $f(x)$ is differentiable for all real numbers, then what is the value of $\frac{a+b+c}{2}$? 
If $f(x)=\begin {cases} a^2 + e^x & -\infty <x<0 \\ x+2 & 0\le x \le 3 \\ c -\frac{b^2}{x} & 3<x<\infty \end{cases}$, where $a,b,c$ are positive quantities. If $f(x)$ is differentiable for all real numbers, then value of $\frac{a+b+c}{2}$ is

Left hand derivative at $x=0$
$$Lf’(0) =\lim_{h\to 0} \frac{2 - (a^2 +e^{-h})}{h}$$
For limit to exist, $2-a^2=0 \implies a=\pm \sqrt 2$
$$L f’(0)=1$$
Right hand derivative at $x=0$
$$R f’(0) =\lim_{h\to 0} \frac{ h+2 -2}{h} =1$$
Left hand derivative at $x=3$
$$Lf’(3) =\lim_{h\to 0} \frac{5- (3-h+2)}{h}=1$$
And
$$Rf’(3) =\lim_{h\to 0} \frac{ c -\frac{b^2}{3+h}-5}{h}$$
For limit to exist, $c=h$
$$Rf’(3) =\lim_{h\to 0} \frac{b^2}{(3+h)(h)}=\infty$$
Where am I going wrong?

First see my comment, and Peter Foreman's comments.
As $x \to 3^-$ (that is, as $x$ approaches 3 from below) 
$f'(x) = 1.$
Also, $f(3) = 5.$
As $x \to 3^+$:
$f(x) \to c - \frac{b^2}{3}.$
$f'(x) \to \frac{b^2}{3^2}.$
Thus, $\frac{b^2}{3^2} = 1 \Rightarrow b^2 = 9.$
Further, $c - \frac{b^2}{3} = 5 \Rightarrow c - 3 = 5.$
Addendum: sneaking in intuition expansion through the back door
Taking a bird's-eye view, neither $a$ nor $c$ will have any effect on any LHS or RHS derivatives.  Therefore, the derivative constraint will only affect $b.$
Consequently, $a$ and $c$ can be interpreted as "free-form" variables whose only purpose is to raise or lower the corresponding segment of the overall function to ensure continuity.
