To determine how many office buildings (denoted as \( x \)) can be washed, we can set up an equation based on the information given.
The window cleaner can clean 21 windows per office building, so for \( x \) office buildings, the total number of windows cleaned would be \( 21x \). They can also clean the windows of a school with 42 windows.
The total number of windows cleaned (from office buildings and the school) is equal to 126:
\[ 21x + 42 = 126 \]
So, the correct equation to solve this problem algebraically is:
21x + 42 = 126