n(A U B) = n(A) + n(B) - n(A n B)
From the question;
n(A n B) = 7 n(A U B) = 54 n(A) = 35
substituting the values into the formular above and then solve for n(B)
54 = 35 + n(B) - 7
54 = 28 + n(B)
subtract 28 from both-side of the equation
54 - 28 = 28 - 28 + n(B)
26 = n(B)