Solution:
Given, A and B invested in the ratio 4 : 5
Let capital of A= 4x
Capital of B = 5x
Time of inestment of A is 8 months. B invested for 'a' months
A:B=4x×8:5x×amonths
A:B=32x:5ax
Profit received Ratio is 8 : 15
ie., 32x:5ax=8:15
5ax32x=158
5a32=158
32×15=5a×8
5a=832×15
a=54×15
a=12months
B invested for 12 months.