The force of friction acts tangentially to the surface of the wheel at the point of its contact with the road (point A & B in the diagram above).
But we here are talking about the direction of friction. It doesnt matter whether the body is accelerating or not. In both the cases (a and b), the direction of the friction will be in the forward direction for both the wheels. Just in case two, the frictional force will be balanced by the force applied. (uniform acceleration)
Reason??? Given below