Dynamics of a two-level atom in a double perpendicular cavity