A hot liquid \(P\) of specific heat capacity \(S\) is mixed with a cold liquid \(Q\) of mass \(40\,\mathrm{g}\) and specific heat capacity \(1.5S\). If the fall in temperature of liquid \(P\) is 3 times the rise in temperature of liquid \(Q\), then the mass of liquid \(P\) is