One who prays for his friend, and he himself needs the same thing, he is answered first.

המתפלל בעד חבירו והוא צריך לאותו דבר הוא נענה תחלה
Shiurim in this topic
1100. The Power of Hidden Charity and Integrating Torah and Mitzvos כוח הצדקה בסתר ושילוב התורה והמצוות