The notes you have attached to your question are, in my opinion, very badly formulated. I see the point that they are trying to make, but for beginners they will serve no purpose other than to confuse them. I will try to make it clearer, and to do so:
I'm going to use all "primed" quantities to represent quantities measured in the $S^\prime$ frame, and all unprimed quantities to represent the same quantities in the $S$ frame.
We will use the Lorentz Transformations are the basis for our analysis:
\begin{equation}
\begin{aligned}
&\text{(A)}\quad\Delta x^\prime = \gamma \left(\Delta x - v \Delta t\right)\\
&\text{(B)}\quad \Delta t^\prime = \gamma \left( \Delta t - \frac{v}{c^2}\Delta x\right)\\
\\
&\text{(C)}\quad\Delta x = \gamma \left(\Delta x^\prime + v \Delta t^\prime \right)\\
&\text{(D)}\quad \Delta t = \gamma \left( \Delta t^\prime + \frac{v}{c^2}\Delta x^\prime \right)\\
\end{aligned}
\label{LT}
\end{equation}
The reason for the confusion is because the notion of length is inextricably linked to the notion of simultaneous events, and in special relativity (unlike in Galilean relativity) people will not agree on whether two spatially separated events are simultaneous or not. I have explained the intricacies of length measurements in this answer here:
[Consider an object that is at rest in $S'$.] For an observer
sitting in $S^\prime$, since the object is at rest with respect to
him, its length $L^\prime$ is simply the difference in the
coordinates, irrespective of when $x_B^\prime$ and $x_A^\prime$ are
measured. He could measure $x_B^\prime$, have a coffee, and then
measure $x_A^\prime$ and the difference would give him the length.
However, for an observer sitting in $S$, since the object is moving
with respect to her, both the endpoints $x_B$ and $x_A$ need to be
measured simultaneously in her frame of reference ($S$) in order for
the difference to be the length $L$. (In other words, if she has a
coffee between measuring $x_B$ and $x_A$, the object would have moved
between measurements!) So, we have
\begin{aligned} L^\prime &= x_B^\prime - x_A^\prime |_\text{ for any $\Delta t^\prime$}\\ L\,\, &= x_B - x_A |_\text{ only when $\Delta t=0$}\end{aligned}
Given this, let's examine your two scenarios. In both scenarios, Lucy and Rick are on the the train, and their friends (let's call them Alice and Bob) are on the platform.
Scenario 1:
Alice is assigned Lucy and Bob is assigned Rick. They simultaneously mark the positions of the person they are assigned to as the train passes by them. According to Alice and Bob, the distance between these marks in the length of the train, since the train is moving with respect to them and they have measured the coordinates of its endpoints simultaneously. What would this length be? Well, what do we know?
- Alice and Bob marked the points simultaneously (i.e. $\Delta t = 0$).
- They marked the positions of Lucy and Rick who (in $S'$) are separated by 100m (i.e. $\Delta x' = 100$m).
We need to find the distance between the points marked by Alice and Bob (which is $\Delta x$) given that $\Delta t = 0$ and $\Delta x' = 100$m. This can easily be done using Equation $(A)$ given above, and we see that
$$\Delta x' = \gamma \Delta x \quad \quad \implies \quad \quad \Delta x = \frac{100\text{m}}{\gamma} < 100\text{m}$$
Good? Let's move on the problematic scenario then.
Scenario 2:
In this scenario, Alice and Bob are on the platform, but Lucy and Rick are the ones marking the positions. What do we know?
- Lucy and Rick mark the positions simultaneously in their frame of reference (and so $\Delta t' = 0$).
- They continue to be at either end of the train (and so $\Delta x'=100$).
We need to find $\Delta x$ (the coordinates between the marks that Lucy and Rick made in the platform's frame of reference), and some inspection will tell you that Equation $(C)$ is the useful one, and so
$$\Delta x = \gamma \Delta x' = \gamma \times 100\text{m} > 100\text{m}$$
All of this so far is correct. So what's "wrong"? The mistake comes in the interpretation that length has "expanded" in the second scenario. Let's examine this closely:
The interpretation:
Lucy and Rick believe that they have marked 100m on the platform, since they marked the two endpoints simultaneously. When they come back later, they find that (according to Alice and Bob standing on the platform) the distance they marked on the platform is $\gamma 100$m.
Rick immediately says that the length of the train must have been larger than 100m according to someone on the platform. However, Alice, having studied a little more relativity says:
"No. We measured a distance on the platform (which was moving with respect to us) that we thought was $100$m. According to someone on the platform, this distance was actually larger! Therefore, what we actually saw was that the (platform) distance of $\gamma 100$m was contracted to $100$m. In other words, we saw lengths on the platform contract, as should be expected, since the platform was moving relative to us."
They argue a little, and then decide to ask Alice and Bob what they saw. Alice and Bob agree with Lucy. According to them, the actions of Rick and Lucy "marking" points on the platform was not simultaneous. They first saw Rick mark a point, and then a short amount of time later saw Lucy mark a point. In the meantime, the train had moved some distance. But this is a natural consequence of relativity: observers in different inertial frames do not agree upon simultaneous events.
"So what did you measure as the length of the train?", Rick asks Alice and Bob. "Well," says Alice, "since the train was moving with respect to us, we measured its length by measuring its endpoints simultaneously (just like in Scenario 1)."
So in conclusion, distances on the train seemed to contract according to someone on the platform, and distances on the platform seemed to contract according to someone on the train. However, due to the way that simultaneous events transform between reference frames, no contradictions arise.