Let Mike sold M cars and Bill sold B cars.
Now both sold 640 cars in total, means M + B = 640,
also Mike sold 3 times as many as Bill, means M = 3*B. So our equations became,
M + B = 640, & M = 3*B, put value of M in terms of B.
3*B + B = 640, 4*B = 640,
B = 640/4, B = 160, as M = 3*B, M = 3*160 = 480.
So Mike sold 480 cars & Bill sold 160 cars.