(N/A) The line of sight is defined as an imaginary line joining an object and an observer's eye.
When we observe nearby stationary objects such as trees or houses while sitting in a moving train,the angle subtended by these objects at our eye changes very rapidly as we move past them. This rapid change in the direction of the line of sight makes them appear to move quickly in the opposite direction.
On the other hand,for distant objects like hilltops,the Moon,or stars,the distance is so large that the change in the angle of the line of sight is negligible even as the train covers a significant distance. Consequently,these objects appear to be stationary or moving slowly with the observer.