Mary works due north of home. Her husband Juan works due east. They leave for work at the same time. By the time Mary is 77 miles from​ home, the distance between them is one mile more than Juan​'s distance from home. How far from home is Juan?