connect point a to point b with x number of cars