The correct options are
A Cars 1 and 2 will come closer to each other.
C Cars 3 and 4 will move away from each other.
In magnets, like poles repel each other, and hence toy cars in figure B will move away from each other as they have the similar poles of the magnet turned towards each other. Whereas opposite poles of two magnets attract each other, and hence toy cars in figure A will move towards each other.