The problem statement:

Distance between two stations A and B is 230 km. Two motorcyclist starts simultaneously from A and B in opposite directions and the distance between them after 4 hours is 50 kms. Speed of each of them in km/hr is:

$$(a) 40, 30 \quad \quad (b)27, 17 \quad \quad (c) 50,40 \quad \quad (d)None$$

The suggested answer is (a) and in the solution it is stated that "Total distance covered here is $280$ kms $(230+50)$ and not $180$ kms $(230-50)$".

But I am not getting this reasoning, could somebody explain me why are we adding instead of subtracting?

-

There are two cases: either they haven't met - or they have met. If they haven't the total distance is $230-50 = 180$ and hence the sum of speed is $45$. No answer fits. While if we assume that they have met on their path - then they done these $50$km after they met - so we add them to $230$km they have done before they met and obtain $280$. As a result, the sum of speeds is $70$ - and we have an answer (a) which fits this result.
The case that they were going in the opposite directions, but not from $A$ to $B$ and from $B$ to $A$ cannot happen since after some time the distance has decreased. While it could happen on a sufficiently small sphere, though - it's unlikely that it was meant in this problem.
@Foool Think of \begin{align} 4v_1+4v_2 &= 230 \pm 50\\ (v_1+v_2) &= 57.5 \pm 12.5\\ &= 70 \vee 45 \end{align} –  user13838 Feb 23 '12 at 12:08