All you have to do it combine one pair of like terms with eachother for each time you move further on the pyramid.
PYRAMID A :
1ST LINE : -2x + 3
2ND LINE : -9x + 6 and 7x - 4
3RD LINE : 3x - 4 and -12x + 10 and 7x - 4
4TH LINE : 2x - 3 and x - 1 and -12x + 10 and 7x - 4
5TH LINE : -6x + 0 and 8x - 3 and x - 1 and -12x + 10 and 7x - 4.
6TH LINE : 2x - 6 and -8x + 6 and 8x - 3 and x - 1 and -12x + 10 and 7x - 4
7TH LINE : (we'll combine the first two terms from below) -1x - 2 and 3x - 4 and -8x + 6 and 8x - 3 and x - 1 and -12x + 10 and 7x - 4.
8TH LINE : it's already given in Pyramid A.
. . .
PYRAMID B :
1ST LINE : 2x - 3y - 6
2ND LINE : 4x - 2y - 5 and -2x - y - 1
3RD LINE : 5x - y - 5 and -x - y and -2x - y - 1
4TH LINE : -x + 2y - 3 and 6x - 4y - 2 and -x - y and -2x - y - 1
5TH LINE : -2x + 2y - 3 and x + y and 6x - 4y - 2 and -x - y and -2x - y - 1
6TH LINE : 2x + 3y - 4 and -4x - y + 1 and x + y and 6x - 4y - 2 and -x - y and -2x - y - 1
7TH LINE : 3x + y + 8 and -x + 2y + 4 and 4x - y + 1 and x + y and 6x - 4y - 2 and -x - y and -2x - y - 1
8TH LINE : given in the attachment, Pyramid B