tan⁻¹(a/g) in the forward direction
tan⁻¹(a/g) in the forward direction
tan⁻¹(a/g) in the backward direction
tan⁻¹(a/g) in the backward direction
Due to horizontal acceleration, a pseudo force 'ma' acts on the bob of pendulum in horizontal direction, backwards. Also the gravitational force 'mg' acts on it vertically downwards.
Hence the angle that the thread makes with the vertical = tan⁻¹(Fx/Fy) = tan⁻¹(ma/mg) = tan⁻¹(a/g) in backward direction