Answer
See the figures below.
Work Step by Step
In the first figure, the rod was away from the electroscope.
So the electroscope is still neutral.
In the second figure when the rod is close enough to the electroscope, the positive charges in the rod attract the free electrons in the electroscope. This will polarize the leaves of the electroscope since that.
In the third figure, when the rod touches the electroscope, the electrons fastly traveled toward the positive charges in the rod. And after enough time we can move the rod away from the electroscope.
In the fourth figure, the electroscope is now polarized since electrons moved away from it, and it is now positively charged and the leaves spread away due to the electric repulsive force between them.