Jessica drove at an average speed of 55 mi/hr from her home in Boston to visit her sister in Atlanta. She stayed in Atlanta 10 hours, and on the trip back averaged 40 mi/hr. She returned home 41 hours after leaving. How many miles is Boston from Atlanta?

so the total time driving was 31 hrs.

Let the distance between B and A be x miles
x/55 + x/40 = 31
multiply by 440
11x + 8x = 13640
x = ....