Let's assume the distance between station A and station B is 'd' kilometers.
When the person traveled from A to B at a speed of 40 km/hr, the time taken for this leg of the journey can be calculated using the formula:
Time = Distance / Speed
So, the time taken from A to B is d / 40 hours.
Similarly, when the person traveled from B to A at a speed of 30 km/hr, the time taken for this leg of the journey can be calculated as:
Time = Distance / Speed
So, the time taken from B to A is d / 30 hours.
According to the problem, the entire journey took 6.3 hours. We can write this as an equation:
(d / 40) + (d / 30) = 6.3
To solve this equation, we can find a common denominator of 120:
(3d + 4d) / 120 = 6.3
Simplifying the equation:
7d / 120 = 6.3
Multiply both sides of the equation by 120:
7d = 6.3 * 120
7d = 756
Divide both sides of the equation by 7:
d = 756 / 7
d ≈ 108
Therefore, the distance between station A and station B is approximately 108 kilometers.