n 10 days A + B can so = 1 work
In 1 day A+B can do = 1/10 work
In 15 days A can do = 1 work
In 1 day A can do = 1/15 work
Let in x days B can do = 1 work
so in 1day B can do 1/x work
In 1 day A+B can do = 1/10 work
1/15 + 1/x = 1/10
1/x = 1/10 - 1/15
1/x = 1/30
x = 30
Hence B can finish the work in 30 days