I don't know what level you are at lha, but I'm thinking all of the equations above might be confusing you.
In my opinion, a simpler model for a SHM oscillator is a simple pendulum.
Imagine it was swinging in the plane of the page. And take right as the positive direction.
At the left...