Answer
When the car and train are moving in the same direction, it takes 3.0 minutes for the car to pass the train and the car travels 4.75 km.
When the car and train are moving in the opposite directions, it takes 21.2 seconds for the car to pass the train and the car travels 559 meters.
Work Step by Step
Let $x_c$ be the distance traveled by the car and and let $x_t$ be the distance traveled by the train;
$x_c = (95 ~km/h)~t$
$x_t = (75 ~km/h)~t$
We need $x_c$ to be 1.00 km more than $x_t$. Therefore;
$x_c - x_t = 1.00 ~km$
$(95 ~km/h)~t- (75 ~km/h)~t = 1.00 ~km$
$(20 ~km/h) ~t = 1.00 ~km$
$t = \frac{1.00 ~km}{20 ~km/h} = \frac{1.00}{20} ~h = 3.0 ~minutes$
We can find the distance traveled by the car:
$x_c = vt = (95 ~km/h) (\frac{1.00}{20} ~h) = 4.75 ~km$
Now let's suppose the train is travelling in the opposite direction. Therefore:
$x_c = (95 ~km/h)~t$
$x_t = (-75 ~km/h)~t$
We need $x_c$ to be 1.00 km more than $x_t$. So,
$x_c - x_t = 1.00 ~km$
$(95 ~km/h)~t- (-75 ~km/h)~t = 1.00 ~km$
$(170 ~km/h) ~t = 1.00 ~km$
$t = \frac{1.00 ~km}{170 ~km/h} = \frac{1.00}{170} ~h = 21.2 ~seconds$
We can find the distance traveled by the car.
$x_c = vt = (95 ~km/h) (\frac{1.00}{170} ~h) = 0.559 ~km = 559 ~meters$