The problem given is using the box method to expand the polynomials.
To perform the multiplication we write the terms of the polynomials along the sides of the box and then perform the multiplication between two perpendicular terms.
Therefore, the explanation gives
Hence,