Step 1: Verify Assertion (A).
For a particle executing S.H.M., the total energy is
\[
E=\frac{1}{2}kA^2,
\]
where \(A\) is the amplitude.
The potential energy at displacement \(x\) is
\[
U=\frac{1}{2}kx^2.
\]
The kinetic energy is
\[
K=E-U
=
\frac{1}{2}kA^2-\frac{1}{2}kx^2.
\]
When kinetic energy equals potential energy,
\[
K=U.
\]
Hence,
\[
\frac{1}{2}kA^2-\frac{1}{2}kx^2
=
\frac{1}{2}kx^2.
\]
\[
A^2=2x^2.
\]
\[
x=\frac{A}{\sqrt2}.
\]
Therefore,
\[
\boxed{x=\frac{A}{\sqrt2}}.
\]
Hence Assertion (A) is true.
Step 2: Verify Reason (R).
The potential energy in S.H.M. is
\[
U=\frac{1}{2}kx^2.
\]
Since displacement varies periodically with time, potential energy also varies periodically with time.
At the extreme positions,
\[
x=\pm A.
\]
Therefore,
\[
U_{\max}
=
\frac{1}{2}kA^2.
\]
Thus, the potential energy is maximum at the extreme displacement.
Hence Reason (R) is also true.
Step 3: Check whether (R) explains (A).
Assertion (A) is obtained from the condition
\[
K=U
\]
and the energy relations
\[
K=\frac{1}{2}k(A^2-x^2),
\qquad
U=\frac{1}{2}kx^2.
\]
Reason (R) only states that potential energy is periodic and maximum at the extreme positions.
Although true, it does not explain why
\[
K=U
\]
occurs at
\[
x=\frac{A}{\sqrt2}.
\]
Therefore, Reason (R) is not the correct explanation of Assertion (A).
Step 4: Final conclusion.
Thus,
\[
\boxed{\text{(A) and (R) are true, but (R) is not the correct explanation of (A).}}
\]
Hence, the correct option is
\[
\boxed{(2)}
\]