Concept:
The basic relation connecting distance, speed, and time is:
\[
\text{Time} = \frac{\text{Distance}}{\text{Speed}}
\]
When speed increases, time decreases for the same distance.
Step 1: Assume the original speed.
Let the original speed of the train be:
\[
x \text{ km/h}
\]
Distance travelled:
\[
400 \text{ km}
\]
Therefore, original time taken is:
\[
\frac{400}{x} \text{ hours}
\]
Step 2: Form the expression for increased speed.
If speed increases by $10$ km/h, then new speed becomes:
\[
x+10
\]
New time taken becomes:
\[
\frac{400}{x+10}
\]
Step 3: Use the information about time reduction.
According to the question:
\[
\text{Original Time} - \text{New Time} = 2
\]
Thus,
\[
\frac{400}{x} - \frac{400}{x+10} = 2
\]
Step 4: Take LCM and simplify carefully.
LCM of denominators:
\[
x(x+10)
\]
So,
\[
\frac{400(x+10)-400x}{x(x+10)} = 2
\]
Expand numerator:
\[
\frac{400x+4000-400x}{x(x+10)} = 2
\]
\[
\frac{4000}{x(x+10)} = 2
\]
Step 5: Remove the denominator.
Cross multiply:
\[
4000 = 2x(x+10)
\]
\[
4000 = 2x^2 + 20x
\]
Divide entire equation by 2:
\[
2000 = x^2 + 10x
\]
Bring all terms to one side:
\[
x^2 + 10x - 2000 = 0
\]
Step 6: Factorize the quadratic equation.
We need two numbers whose product is:
\[
1 \times (-2000) = -2000
\]
and sum is:
\[
10
\]
These numbers are:
\[
50 \quad \text{and} \quad -40
\]
Therefore,
\[
(x+50)(x-40)=0
\]
Step 7: Find the valid value of speed.
So,
\[
x=-50
\]
or
\[
x=40
\]
Since speed cannot be negative:
\[
x=40
\]
Hence, the speed of the train is:
\[
\boxed{40 \text{ km/h}}
\]