They both wrote to Subayah bint Harith asking her about her situation, and she wrote back to them. At the end of her letter she mentioned that the Messenger of Allah ﷺ had said, "If you find a righteous husband, then marry."
أنهما كتبا إلى سبيعة بنت الحارث يسألانها عن أمرها، فكتبت لهما. وفي آخره أن رسول الله ﷺ قال: إن وجدت زوجا صالحا فتزوجي.