In the future how should he avoid walking between women in a similar case? How severe is that walking between women prohibition?

On question 3755 regarding seating in a full plane between two women, we wrote: “The source for this tradition is the Talmud Pesachim (111a) that teaches; In three cases one should not be allowed to pass between two people walking along a road, and people should not walk between two of them, and one of them is a woman. Talmud Horios (13b) mentions that this is one of the ten acts that cause the forgetting of the Torah. Although this Halacha is quoted in Kitzur Shulchan Aruch (50: 8), it is omitted in Shulchan Aruch, yet the minhag is kept. Horav Shlomo Miller’s Shlit’a opinion is that one does not need to compensate monetarily the women to change seats if they refuse after being asked to kindly do so.” See also question 1655 and 2995 regarding participating in a marathon or a large walking event when women also take part.