The car accelerates with acceleration a. In the reference frame of car the effective value of acceleration due to gravity is

We shall work in the car frame. As it is accelerated with respect to the road, we shall have to apply a pseudo force m a0 on the bob of mass m.
For mean position, the acceleration of the bob with respect to the car should be zero. If θ be the angle made by the string with the vertical, then tension, weight and the pseudo force will add to zero in this position.
Suppose at some instant during oscillation, the string is further deflected by an angle α so that the displacement of the bob is x. Taking the components perpendicular to the string, component of T = 0,
component of mg mgsin =(α+θ) and component of


This is an equation of simple harmonic motion with

As easy working rule may be found out as follows. In the mean position, the tension, the weight and the pseudo force balance. From figure, the tension is

This plays the role of effective ‘g’. Thus the time period
