I'm going to share advice with my cubicle neighbor regarding a sensitive problem I overheard
What do you plan on telling them?
I will say "I think you need to relax a little bit, don't talk to others about your personal stuff."
Wanting to help your coworkers solve their problems is understandable and a good thing to do but you should be careful. If this is a matter that they consider personal then you may be adding to the problem rather than helping. Just talk to your coworker normally and if they bring it up themselves then offer your advice.
I have limited time with them, I'm just trying to be helpful.
It might just not be appropriate to have this conversation. Minding your own business might be the best action and to focus on your work.