So I have a problem of
$$a_n = \left(1 + \frac{2}{n}\right)^n$$
I need to determine whether it is diverging or converging and find the limit if it is converging I found an answer on symbol lab of $e^2$ but I do not know how they got that type of answer
It is indeed $e^2$, because of the well-known result that $\lim_{n\to\infty}(1+\dfrac xn)^n=e^x$.
Probably my favorite proof of this uses a single interval Riemann sum, coupled with the sandwich or squeeze theorem for limits.
I will try to recreate it if you like.
To wit, define $\ln x:=\int_1^x\dfrac1t\operatorname{dt}$. Then by doing an upper and lower Riemann sum (one subinterval) we get: $$\dfrac xn\le\ln (1+\dfrac xn)\le\dfrac n{n+x}\cdot\dfrac xn$$. Now take $e$ of everything, raise everything to the $n$th power, and take the limit.