Here is the passage again:
To stomach the cup of strong coffee that he desperately needed to keep awake.
Lawrence added seven packets of sugar and a quarter cup of cream.
You chose to use Punctuation Rule 6 to fix the problem:
Infinitive phrase + , + main clause.
The correction looks like this:
To stomach the cup of strong coffee that he desperately needed to keep
awake, Lawrence added seven packets of sugar
and a quarter cup of cream.
Well done! Don't share that chocolate bar with anybody! You deserve the entire thing!