If I am coming from another city for a bone marrow transplant, how long do I need to stay near the hospital?

Speak with Team. You really need to speak directly with the team doing your bone marrow transplant for their advice and recommendations.
Ask the center. It will definitely depend on the center and your distance from the transplant center so ask your doctor or nurse. In general most transplant centers will want patients getting their own cells (autologous) in the area for about 1 month. With a donor transplant (allogeneic) it is typically around 100 days but can be longer if there are complications.