Let A takes x and B takes 3N days to finish the job.
According to the question,
3N - N = 30
∴ N = 30/2 = 15 days
∴ B's time to complete the work = 3N
= 3 x 15 = 45 days
∴ (A + B)'s 1 day's work
= (1/15) + (1/45) = (3 + 1)/45 = 4/45
∴ (A + B) will finish the work in 4/45 days
∴ Required time = 4/45 = 111/4