Take the battery polarities as in Figure 3 (long plate positive): the 8 V cell sends current $I_1$ through the branch towards A, and the 12 V cell sends $I_2$ towards E; both meet at F and flow through the 5 Ω resistor, so $I = I_1+I_2$ (Kirchhoff's junction rule at F).
Loop A-B-C-F (8 V cell, 2 Ω, 6 Ω, 5 Ω): $8 = (2+6)I_1 + 5(I_1+I_2) \Rightarrow 13I_1 + 5I_2 = 8$.
Loop E-D-C-F (12 V cell, 3 Ω, 9 Ω, 5 Ω): $12 = (3+9)I_2 + 5(I_1+I_2) \Rightarrow 5I_1 + 17I_2 = 12$.
Solving: $I_1 = 19/49 = 0.388$ A, $I_2 = 29/49 = 0.592$ A.
Current through the 5 Ω resistor: $I = I_1 + I_2 = 48/49 \approx 0.98$ A (from F to C).