وَلَا يَجُوزُ لَهَا أَنْ تَحُجَّ مَعَ غَيْرِهِمَا إِذَا كَانَ بَيْنَهَا وَبَيْنَ مَكَّةَ مَسِيرَةُ ثَلَاثَةِ أَيَّامٍ وَلَيَالِيهَا، فَصَاعِدًا
Translation: Under this ruling she may not travel for Hajj with someone other than those two when the distance to Mecca is a journey of three days and nights or more.
Masīrat thalāthat ayyām wa-layālīhā is a classical way of defining travel distance, not merely an elapsed 72-hour clock reading. Jurists have methods for construing that journey threshold.
The statement is the classical Hanafi position, while other schools and modern travel circumstances may be discussed distinctly.