Hint: The maximum energy of the oscillator is equal to the potential energy at the extreme position.
Let us assume that the required displacement is x.
Step 1: Find the potential energy at the general position.
The potential energy of the simple harmonic oscillator
Step 2: Find the total energy of the oscillator.
Where k=force constant
Maximum energy of the oscillator,
where A=amplitude of motion
Step 3: Find the value of the position.
Given,
or
The sign indicates either side of the mean position.