Let's analyze the motion of the parrot relative to the train. The parrot is flying towards the south direction parallel to the railway track, and the train is moving towards the north direction.
The parrot's speed is 5 m/s, and the train's speed is 10 m/s. Since they are moving in opposite directions, we can find their relative speed by subtracting the parrot's speed from the train's speed:
Relative speed = Train's speed - Parrot's speed
Relative speed = 10 m/s - 5 m/s
Relative speed = 5 m/s
Now, let's calculate the time it takes for the parrot to cross the entire length of the train, which is 150 meters. We can use the formula:
Time = Distance / Speed
Time = 150 m / 5 m/s
Time = 30 seconds
So, it takes the parrot 30 seconds to cross the entire length of the train relative to the train's motion. However, we need to consider that the train is also moving in the north direction during this time. Since the train's speed is 10 m/s and the parrot is flying south at 5 m/s, the effective speed of the parrot relative to the ground (including the train's motion) is:
Effective speed = Parrot's speed - Train's speed
Effective speed = 5 m/s - (-10 m/s) (Negative because they are moving in opposite directions)
Effective speed = 5 m/s + 10 m/s
Effective speed = 15 m/s
Now, we can calculate the time it takes for the parrot to cross the train relative to the ground:
Time = Distance (train's length) / Effective speed
Time = 150 m / 15 m/s
Time = 10 seconds
So, the time taken by the parrot to cross the train relative to the ground is 10 seconds. Therefore, the correct answer is (D) 10 seconds.