Concept:
Use the standard limit
\[
\lim_{x\to\infty}\left(1+\frac{k}{x}\right)^x=e^k.
\]
For limits of the form
\[
\left(1+\frac{a}{x}+\frac{b}{x^2}\right)^{2x},
\]
the dominant term inside the bracket is \(\dfrac{a}{x}\).
Step 1: Take logarithm of the given limit.
Let
\[
L=\lim_{x\to\infty}\left(1+\frac{a}{x}+\frac{b}{x^2}\right)^{2x}.
\]
Then
\[
\ln L
=
\lim_{x\to\infty}
2x\ln\left(1+\frac{a}{x}+\frac{b}{x^2}\right).
\]
Using
\[
\ln(1+t)=t+o(t),
\]
where
\[
t=\frac{a}{x}+\frac{b}{x^2},
\]
we get
\[
\ln L
=
\lim_{x\to\infty}
2x\left(\frac{a}{x}+\frac{b}{x^2}\right).
\]
\[
=
\lim_{x\to\infty}
\left(2a+\frac{2b}{x}\right).
\]
\[
=2a.
\]
Hence,
\[
L=e^{2a}.
\]
Step 2: Use the given value of the limit.
Given
\[
L=e^2.
\]
Therefore,
\[
e^{2a}=e^2.
\]
Comparing exponents,
\[
2a=2.
\]
\[
a=1.
\]
Therefore,
\[
\boxed{a=1}
\]
\[
\boxed{\text{Answer = (B)}}
\]