The wall area would be (9 ft) Â [ (2) (21 ft) + (2) (22 ft) ]
Simplifying, A = Area = 9(42+44) ft^2 = 774 square feet.
You did not share info regarding how many square feet of all a gallon container will cover. Â Let us for example purposes only suggest that each gallon will cover 400 square feet.
Then:
Â
774 sq ft     1 gal
------------- * --------------- * 2 coats = 3.87 gal. Â Round this up to 4 gal. Â
    1      400 sq ft