Let the one-way distance be D km.

• With tailwind (A to B): speed = 500 + 50 = 550 km/h, time = D/550.
• With headwind (B to A): speed = 500 − 50 = 450 km/h, time = D/450.
• Total time = 2 h.

D/550 + D/450 = 2
D × (1/550 + 1/450) = 2
D × ((450 + 550)/(550 × 450)) = 2
D × (1000/247500) = 2
D = 2 × 247500/1000 = 2 × 247.5 = 495 km.

Final Answer: 495 km