Little comment is needed. The verse itself speaks so clearly!
BUT, the question is often asked, "How do you know what to say?" We ask that when we're confronted with a situation outside our "comfort zone." Here are a few helps:
First, spend time in prayerful reading of the Scriptures. God's Word provides the right response to any and every situation. The more you meditate on the Bible the more you'll be familiar with the right passages that can bring the right response.
Second, don't forget to learn what you can from every situation. You'll find your understanding grows when you face troubles and deal with them. Remember 2 Corinthians 1:3,4 regarding being comforted when you're in need. Use the same comforting words with others when they face troubles of their own.
Finally, believe that God places you at the right place and at the right time to say the right thing.