Simple harmonic motion looks like d = Acos(2πt/T) + B sin(2ππt/T) or Acos(ωt+δ)
In this case the x(0) = 0 and you are given an amplitude of 5 cm so the equation is d = 5sin(2πt/8) because the constant A must be 0 in the form of equation given and B must be Amplitude when sin is 1 (a max)
Because the velocity is negative, initially, we know that we have to change the sign as x must decrease as t increases from 0.
d = -5sin(2πt/8)
You might also know that v = 2πxm/T cos(2πt/T) which shows why the negative sign is required at t=0 in order to have a negative v.