B is only for one car and no space means how many car are there? Now think for one space how many car should go? Now finally how many way it is possible? You will get the ans
If you call the spaces A B and C, for one space to be empty either space A could get vacated or space B or space C could be vacated. (i.e either one of 3 cars leaves the space, there is one space vacant). Since it is either, you add up the probabilities and so you get 3B.