Let g(x) be linear, so write g(x)=ax+b.
For continuity of f(x) at x=0 we need the right-hand limit of the second branch to equal g(0).
Consider y(x)=(2+x1+x)1/x for x>0.
Take logarithm:
lny=x1ln(2+x1+x)=xln(1+x)−ln(2+x).
Using series ln(1+z)=z−2z2+O(z3) about z=0,
ln(1+x)−ln(2+x)=−ln2+2x+O(x2).
Hence
lny=x−ln2+21+O(x).
As x→0+, x−ln2→−∞, so y(x)→0.
Therefore x→0+limf(x)=0, which must equal g(0)=b.
Thus b=0 and g(x)=ax.
Next, compute f′(1) from the second branch.
Again set y(x)=(2+x1+x)1/x.
With lny=u(x)=x1ln(2+x1+x), we have
yy′=u′(x).
Write v(x)=ln(1+x)−ln(2+x) so that u(x)=xv(x).
Then
v′(x)=1+x1−2+x1.
At x=1:
v(1)=ln2−ln3=ln(32),
v′(1)=21−31=61.
Therefore
u′(1)=121⋅v′(1)−v(1)=61−ln(32).
Also y(1)=(32)1=32.
Hence
f′(1)=y′(1)=y(1)u′(1)=32(61−ln32).
The condition f′(1)=f(−1) gives
32(61−ln32)=g(−1)=a(−1)=−a.
Solve for a:
a=−32(61−ln32)=−91+32ln32.
Finally,
g(3)=3a=3(−91+32ln32)=−31+2ln32=ln94−31=ln9e1/34.
Hence g(3)=loge9e1/34, which corresponds to Option D.