A close call: Brooklyn and David looked relieved as the Dodgers emerged victorious