Given,
A can do a work in = 10 days
B can do a work in = 15 days
A’s, 1 day's work = 110 ... (1)
B’s, 1 day's work = 115
(A+B)’s 1 day's work = 110+115=3+230=530=16
Now, let us consider (A+B) worked together for x days.
So, (A+B)’s, x day work = x6
Remaining work =1−x6
It is given that,
A can do the remaining work, (1−x6) in =5 days
So, A’s 1 day's work =1−x65=6−x30 ... (2)
From (1) and (2), we get
110=6−x30⇒3010=6−x⇒3=6−x⇒x=6−3=3
∴ Both A and B can do the work together in 3 days.