18^2 & = 12^2 + 22^2 - 2(12)(22) \cos B && \text{Law of Cosines} \\ 324 & = 144 + 484 - 2(12)(22) \cos B && \text{Simplify squares} \\ 324 & = 144 + 484 - 528 \cos B && \text{Multiply} \\ 324 & = 628 - 528 \cos B && \text{Add} \\ -304 & = -528 \cos B && \text{Subtract}\ 628  \\0.575757576 & = \cos B && \text{Divide by}\ -528 \\54.8^\circ & \approx B && \cos^{-1} \ (0.575757576)
{}