This is hard

How did it go from this to that

I’m not sure I understand your question, but this looks like a problem where Black has to try to live with the group. In the image below I’ve copied the position, and numbered the moves

If black plays at 1 first, and white responds with 2, then when black plays 3 it captures the stone marked by a cross, since the white stone has no liberties: all spaces surrounding it are filled by black stones.

In fact, Black must play at 1 to save the group. For example, if Black plays as follows, then White can capture the whole group:

Even if Black doesn’t play the third move, but some other move somewhere else, then White can capture the stones on the left with 4:

If White plays first, Black will also die:

After White plays 1, both A and B would result in Black being captured. Since Black cannot play both at the same time, White is guaranteed to kill the Black stones.