For a better understanding of the explanation provided here kindly go through the file attached.
Since, the weight attached is already at the lowest point at time, t=0, therefore, the equation will have a -9 as it's "amplitude" and it will be a Cosine function. This is because in cosine function, the function has the value of the amplitude at t=0.
Now, we know that the total angle in radians covered by a cosine in a given period is and the period given in the question is t=3 seconds. Therefore, the angular velocity, of the mentioned system will be:
Combining all the above information, we see that the equation which models the distance, d, of the weight from its equilibrium after t seconds will be:
Thus, Option B is the correct option. The attached diagram is the graph of the option B and we can see clearly that at t=3, the weight indeed returns to it's original position.