The answer is 12.3 hours.
On the way to the beach, the family averaged 58 mi/h over 377 mi, so we take 377/58 to find the amount of time spent going to the beach. 377/58 = 6.5 hours.
On the way back, they averaged 65 mi/h over the same 377 mi, so we take 377/65. 377/65 = 5.8 hours.
6.5 + 5.8 = 12.3