The equation $\frac{d^2x}{dt^2} = -\omega^2 x$ is the standard SHM differential equation.
General solution: $x(t) = C_1 \cos(\omega t) + C_2 \sin(\omega t)$
Applying initial conditions:
$$x(0) = A \implies C_1 = A$$
$$v(0) = \frac{dx}{dt}\bigg|_{t=0} = -C_1\omega\sin(0) + C_2\omega\cos(0) = C_2\omega = 0 \implies C_2 = 0$$
$$\boxed{x(t) = A\cos(\omega t)}$$