Let's take the movement of the pendulum to the right as positive-y and the movement to the left as negative-y. When the pendulum is at rest, the curve will be at y = 0
The initial position of the pendulum is +12 so we start our curve at y = 12 when x = 0 (because the initial time is when x = 0)
The pendulum swings back to its zero position in 8 seconds, so on the graph this means when y = 0, x = 8
The pendulum swings to the left, and will reach its furthest position at y = -12 and by now the x = 16 (eight seconds from the previous position).
When x = 20, the pendulum is nearly halfway back to its resting position
The graph is shown below