Set each pipe’s share of the work, then tell the solver whether you were given the joint time or the gap between the two individual times. Every step is one line of the method, and the last one checks the given number back out again.
A : B = 3 : 1, together 30 hours
A 40 h · B 120 h
Try 1 : 1 with the gap given. Equally efficient pipes finish at the same moment, so there is no gap for the question to state and the solver refuses to answer.