Praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
The majority of scholars are agreed that having a Mahram or a husband is a condition for the obligation of Hajj on a woman. If this condition is not met, then Hajj is not obligatory for her. This is because the Prophet (PBUH) said, "A woman should not travel except with a Dhu-Mahram (her husband or a man with whom that woman cannot marry at all according to the Islamic Jurisprudence), and no man may visit her except in the presence of a Dhu-Mahram." A man got up and said, "O Allah's Messenger (PBUH)! I intend to go to such and such an army and my wife wants to perform Hajj." The Prophet (PBUH) said (to him), "Go along with her (to Hajj)." {Transmitted by Bukhari}.
According to the Shafi'i school of thought, it is obligatory for a woman to perform Hajj if she has a husband, a Mahram (a male relative she is not allowed to marry), or trustworthy women accompanying her. Imam Al-Nawawi mentioned in his book "Mughni al-Muhtaj" (2/216) from the Shafi'i literature: "It is a condition for the obligation of Hajj for a woman - in addition to what was mentioned for men - that she is accompanied by her husband, a Mahram with whom she has a blood relationship or otherwise, or trustworthy women."
It is not obligatory for a woman to travel alone for Hajj. However, if she chooses to do so and is confident in her safety, then this is permissible for her. As mentioned in the book "Tuhfat al-Muhtaj" (4/25): "As for permissibility, it is allowed for her to travel to perform this obligation of Islam with a trustworthy woman... and it is also permissible for her to travel alone if she is confident in her safety. All of this is in the case of obligatory Hajj or Umrah..."
The Shafi'i school of thought arrived at this conclusion based on the general meaning of the verse in Surah Aal-E-Imran (3:97): "And [due] to Allah from the people is a pilgrimage to the House - for whoever is able to find thereto a way." They also interpreted the hadith "A woman should not travel except with a Mahram" as applying to non-obligatory travel and as a precaution for obligatory acts of worship.
As stated in the book "Nihayat al-Muhtaj ila Sharh al-Minhaj" (3/250): "The difference between obligatory and non-obligatory acts lies in the extent to which their objectives necessitate taking the least level of security into consideration. In the case of non-obligatory acts, precaution is taken to ensure security."
Based on the given information, it is permissible for a woman to travel alone for the obligatory Hajj or Umrah, whether she is old or young, either with a Mahram, husband, trustworthy women/woman, or even alone, as long as she is confident in her safety. And Allah the Almighty knows best.