Answer:
1) prepare the journal entry to correct the error assuming it is discovered before the books are adjusted or closed in 2018.
The first entry was:
December 21, 2018, equity investment sold:
Dr Cash 100,000
  Cr Investments 100,000
The correct entry should have been:
Dr Cash 100,000
  Cr Investments 80,000
  Cr Gain on sale 20,000
So the adjusting entry is:
Dr Investments 20,000
  Cr Gain on sale 20,000
2) Prepare the journal entry to correct the error assuming it is not discovered until early 2019.
Instead of adjusting gain on sale, we must adjust retained earnings since gain on sale would have been closed at the end of the year:
Dr Investments 20,000
  Cr Retained earnings 20,000