A frustrum of pyramid with square base has its upper and lower sections as squares…