2. From points $A$ and $B$, which are 300 km apart, two cars set off simultaneously. The speed of the car that left from $A$ is 40 km/h. Determine the speed of the second car, given that after two hours the distance between them was 100 km.
2. The problem statement does not specify the direction in which the cars are moving, so all possible scenarios should be considered: moving in opposite directions, towards each other, both in the direction of $A B$, and both in the direction of $B A$.

Assume the cars are moving in opposite directions. This scenario, as well as the scenario where both cars move in the direction of $A B$, is impossible because the distance between the cars would be greater than 100 km.

Assume the cars are moving towards each other.

1) $40 \times 2=80$ km - the first car traveled in two hours;
2) $80+100=180$ km - the distance from $A$ to the second car;
3) $300-180=120$ km - the second car traveled in two hours;
4) $120: 2=60 \text{ km} / \text{h}$ - the speed of the second car.

Assume both cars are moving in the direction of $B A$.

1) $40 \times 2=80$ km - the first car traveled in two hours;
2) $300+80=380$ km - the distance from $B$ to the first car;
3) $380-100=280$ km - the second car traveled in two hours;
4) $280: 2=140$ km $/$ h - the speed of the second car.

Answer: The speed of the second car is 140 km $/$ h or 60 km $/$ h.