This is a part from my project on which I'm working on.
The problem is with the timer created by the Capacitor and the resistor. When the motor rotates in one direction at a time created by the timer, it rotates in the opposite direction at a much shorter period. Is there any way to improve the time?? I've tried a lot of combination of resistor and capacitor value but none of them gave a close differences of time for two opposite direction.
I'm not 100% sure of what you want. But I think you want the motor to run for a given time when the output of the AND gate goes high and to run in the reverse direction for the same time when it goes low.
If so, this circuit will provide the pulses you need.
C2 is charged when X is low, C1 is charged when X is high.
If necessary, the charging time of these capacitors can be reduced by inserting a diode in parallel with R1 and another in parallel with R2.