I'm having issues solving this problem. Here is what I have tried so far.
$$ u=\dot {x_1} + x_1 $$ $$ J= \frac{1}{2} \int_{0}^{t_1}((2x_1)^2+2\dot {x_1} x_1 + \dot {(x_1)^2})dt$$
Can I proceed and say $$\frac{d}{dt}(\frac{\partial L}{\partial x_1})-\frac{\partial L}{\partial \dot {x_1}}=0 $$ or would this be incorrect because I don't have $t_1$? I also think Pontryagin might help here but I'm not sure how to proceed if that's the case. Thanks in advance!

Calling
$$ H(x,u,\lambda) = \frac{1}{2} \left(u(t)^2+x(t)^2\right)+\lambda (t) (u(t)-x(t)) $$
we have
$$ \dot\lambda(t) = -\frac{\partial H}{\partial x} = \lambda(t)+x(t)\\ \frac{\partial H}{\partial u} = \lambda(t) + u(t) = 0 $$
Now solving
$$ \dot\lambda(t) = \lambda(t)+x(t)\\ \lambda(t) + u(t) = 0\\ \dot x(t)+x(t) = u(t) $$ we obtain
$$ x(t) = \frac{\left(7 c_1-3 c_2\right) \sinh \left(\sqrt{2} t\right)}{\sqrt{2}}+\left(5 c_1-2 c_2\right) \cosh \left(\sqrt{2} t\right)\\ \lambda(t) = \frac{\left(7 c_2-17 c_1\right) \sinh \left(\sqrt{2} t\right)}{\sqrt{2}}+\left(5 c_2-12 c_1\right) \cosh \left(\sqrt{2} t\right) $$
Now including the contour conditions $x(0) = 1, x(t_f) = 2$ we obtain
$$ c_1= 2 \sqrt{2} \coth \left(\sqrt{2} t_f\right)-4 \sqrt{2} \text{csch}\left(\sqrt{2} t_f\right)+3\\ c_2= 5\sqrt{2} \coth \left(\sqrt{2} t_f\right)-10 \sqrt{2} \text{csch}\left(\sqrt{2} t_f\right)+7 $$
Now from the conditions
$$ H_{t_f} = 0\\ u(t_f)+\lambda(t_f) = 0 $$
we obtain
$$ \lambda(t_f) = 2\left(-1\pm\sqrt 2\right) $$
and then follows
$$ t_f = \frac{\ln 2}{\sqrt 2} $$
etc.