Solution
David simplified a polynomial
For the first step
Open the brackets
The first step is correct.
For the second step
Collect like terms
The second step is correct
For the third step
Add up the like terms
The third step is correct.
Hence, David did not make a mistake