Let \( b \) represent the number of office buildings Liam cleaned.
Liam cleaned 21 windows per office building, so the total number of windows cleaned from the office buildings would be \( 21b \).
He also cleaned 42 windows from the school.
The total number of windows cleaned is the sum of the windows cleaned from the office buildings and the school:
\[ 21b + 42 = 126 \]
This equation can be solved to determine the number of office buildings \( b \) that Liam cleaned.
To summarize, the equation that could be used to solve this problem algebraically is:
\[ 21b + 42 = 126 \]