If the green ball is placed at the 10

^{th} position from left, then the red ball can be placed to the left of the green ball in 9 ways.

If the green ball is placed at the 9

^{th} position from left, then the red ball can be placed to the left of the green ball in 8 ways.

If the green ball is placed at the 8

^{th} position from left, then the red ball can be placed to the left of the green ball in 7 ways.

Similarly, if the green ball is placed at the seventh, sixth, fifth, fourth, third and second places, then the red ball can be placed in 6, 5, 4, 3, 2, 1 ways respectively.

In all these ways, the remaining 8 balls can be arranged in (8!) ways.

∴ Total number of ways = (9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1) × (8!)

= 45 × 8!

= (9 × 5) × (8!)

= 5 × 9!

Hence, option 4.

*Alternatively*,

The total number of ways of arranging the ten balls is 10!

Out of these, in exactly half the ways, the red ball will be to the left of the green ball, and in the remaining ways, to the right of the green ball.

Hence, option 4.