When Imam Mahdi (a) reappears, it will be clear to the believers what their obligation is. Not everyone will travel and go to Mecca. Some believers will be regional representatives of the Imam, and they will be given tasks to complete in their areas.
Or if there are two brothers, one can go and the other stay to take care of the parents.