Gupta and Bansal enter into a partnership with their capitals in the ratio 5:6. At the end of 8 months, Gupta withdraws his capital. If they receive their shares of the profits in the ratio 5:9, find out how long Bansal's capital was invested in the business?