You can continue with autopilot B but only in basic direct modes VOR LOC, HDG SEL, LVL CHG, V/S etc until you complete the QRH action items.
If you want to keep the VNAV/LNAV functions urgently you can just change to autopilot A and reselect VNAV/LNAV as required. Then carry out the QRH actions.