1. Wickedness in the place of justice (16-17)
The Teacher saw something else under the sun. He saw wickedness on the earth where there should be judgment and justice. The Teacher's conclusion to this was that God would bring both the righteous and wicked to justice in His own time. There is a time for judgment for every deed under the sun.
2. We are like animals (18-22)
The Teacher postulates that people are just like animals. Just like the wise and the foolish both have the same fate, so do both people and animals. Just as we both live, we both will die in God's time. The Teacher decides that because of this, people have no advantage over animals. Who knows who will go to heaven and who will go to hell? So what are we to do? The Teacher concludes that our God-given lot is to work. So, we should enjoy it! How can we enjoy our work? Know that it is from God.