x²x1AB

Cells with the same colour are like terms. Add them up to get the answer.