—these two categories stem from breastfeeding. In the same way, the paternal aunt by nursing and the maternal aunt by nursing are also maḥrams, for the Prophet ﷺ said, “Breast-feeding renders unlawful what blood relations render unlawful.”
With regard to affinity, the husband’s father and his grandfather—whether on the father’s side or the mother’s side—are maḥrams for the wife. Likewise, the husband’s son, the son’s daughter, and all of his descendants are her maḥrams as well. Therefore, if the husband’s grandfather were to travel with his son’s wife, there would be no harm, since he is her maḥram. Similarly, if an adult son of the husband were to travel with his father’s wife, that too is unobjectionable, because she is his maḥram.
As for the notion held by some laypeople that a man becomes a woman’s maḥram simply because he saves her from danger, it has no basis whatsoever. Some claim that if a woman is drowning and a man rescues her, or if a house catches fire and he pulls her out, he then becomes her maḥram—this is unfounded and incorrect.
In summary: the maḥrams are seven by lineage, seven by breastfeeding, and four by affinity. As for the husband, it is self-evident that he is a maḥram by virtue of the marriage bond. Allah alone grants success.