All right:
1)It's easiest to do this in the rest frame of the lorry.
This is a NON-inertial reference frame, and if the acceleration of the lorry, measured in an inertial frame, is a\vec{i} the door experiences, in the lorry's reference frame, a pseudo-force -ma\vec{i} acting at the C.M of the lorry.
m is the mass of the door).
2) Consider now the torque produced by the pseudo-force about the hinge.
(Choosing the hinge as our point eliminates the need to estimate the forces acting on the door AT the hinge!)
Let the position vector of the C.M of the door, measured from the hinge be:
\vec{r}=\frac{L}{2}(\cos\theta(t)\vec{j}-\sin\theta(t)\vec{i})
That is, at t=0, we set the angular displacement equal to zero, and L is the length of the door.
When the angle equals \pi the door has closed.
The torque of the pseudo-force about the hinge is therefore:
\vec{r}\times(-ma\vec{i})=\frac{La}{2}\cos\theta(t)\vec{k}
3. The moment-of momentum equation may therefor be written as follows, in scalar form:
m\frac{La}{2}\cos\theta=\frac{1}{3}mL^{2}\frac{d^{2}\theta}{dt^{2}}
Or:
\frac{d^{2}\theta}{dt^{2}}=\frac{3a}{2L}\cos\theta
4.
Our initial conditions reads:
\theta(0)=0,\dot{\theta}(0)=0
("dot"-notation means temporal derivative)
We multiply our moment-of momentum equation with \dot{\theta}, integrate the result from t=0 to an arbitrary t-value, and makeuse of the initial conditions:
\frac{1}{2}(\dot{\theta}(t))^{2}=\frac{3a}{2L}\sin\theta(t)
Or, since we're only interested in the time period where \theta increases up to \pi we have:
\dot{\theta}=\sqrt{\frac{3a}{L}\sin\theta}
We make a change of variables, and find that the period T must fulfill:
T=\int_{0}^{\pi}\sqrt{\frac{L}{3a}}\frac{d\theta}{\sqrt{\sin\theta}}}