I know how to solve the trigonometric part of the limit, i.e $\left(\tan(x+\frac{\pi}{4})\right)^{1/x}$, which I think is $e^2$, I do not however, know how to carry forward the question with that.
Also, I am sincerely sorry for the upsetting format, i have no clue how to use mathjax.
$$\frac{\left(\tan\left(x+\frac{\pi}{4}\right)\right)^{\frac{1}{x}}-e^2}{x^2}=\frac{\left(\frac{1+\tan{x}}{1-\tan{x}}\right)^{\frac{1}{x}}-e^2}{x^2}=$$ $$=\frac{\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)^{\frac{1}{x}}-e^2}{x^2}=\frac{\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)^{\frac{1-\tan{x}}{2\tan{x}}\cdot\frac{2\tan{x}}{x(1-\tan{x})}}-e^2}{x^2}=$$ $$=\frac{e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{2\tan{x}}{x(1-\tan{x})}}-e^2}{x^2}=$$ $$=\frac{\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}}-e\right)\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}}+e\right)}{x^2}\rightarrow$$ $$\rightarrow\frac{2e^2\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}-1\right)}{x^2}=$$ $$=\frac{2e^2\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}-1\right)}{ \frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}\cdot\frac{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}{x^2}\rightarrow $$ $$\rightarrow2e^2\cdot \frac{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}{x^2}=\frac{e^2\left(\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)-2x\right)}{x^3}=$$ $$=\frac{e^2(\ln(1+\tan{x})-\ln(1-\tan{x})-2x)}{x^3}\rightarrow$$ $$\rightarrow\frac{e^2\left(\frac{\frac{1}{\cos^2x}}{1+\tan{x}}+\frac{\frac{1}{\cos^2x}}{1-\tan{x}}-2\right)}{3x^2}=$$ $$=\frac{e^2\left(\frac{2}{\cos^2x(1-\tan^2{x})}-2\right)}{3x^2}=\frac{2e^2(1-\cos2x)}{3x^2\cos2x}=\frac{4e^2\sin^2x}{3x^2\cos2x}\rightarrow\frac{4e^2}{3}.$$