Let the number of bananas in lots A and B be x and y, respectively
Case I Cost of the first lot at the rate of Rs. 2 for 3 bananas + Cost of the second lot at the rate of Rs. 1 per banana = Amount received
`rArr " " (2)/(3)x+y=400`
`rArr " " 2x+3y=1200 " " ...(i)`
Case II Cost of the first lot at the rate of RS. 1 per banana+ Cost of the second lot at the rate of Rs. 4 for 5 bananas = Amount received
`rArr " " x(4)/(5)y=460`
`rArr " " 5x+4y=2300 " " ...(ii)`
On multiplying in Eq. (i) by 4 and Eq. (ii) by 3 and then subtracting them, we get
`{:(8x+12y=4800),(ul(15x+12y=6900)),(" "-7x=-2100):}`
`rArr " " x=300`
Now, put the value of x in Eq. (i), we get
`2xx300+3y=1200`
`rArr" " 600+3y=1200`
`rArr " " 3y=1200-600`
`rArr " " 3y=600`
`rArr " " y=200`
`:. ` Total number of bananas=Number of bananas in lot A+ Number of bananas in lot B = x+y
=300+200=500
Hence, he had 500 bananas.