Let A=I and B=4I
When two waves have a phase difference of (2n+1)pi, ninZZ, the peak of one wave is directly above the trough of another. Therefore destructive interference occurs. So, the magnitude of the intensity is abs(A-B)=abs(I-4I)=abs(-3I)=3I
However, if the two waves have a phase difference of 2npi, ninZZ, then the peak of one wave lines up with the peak of another. And so, constructive interference occurs and the intensity becomes A+B=I+4I=5I
Matt Comments
Intensity is proportional to amplitude square (IpropA^2) so if wave of I has amplitude A then the wave of 4I would have amplitude 2A
When 2pi out of phase, you have constructive interference (so amplitude 2A+A=3A and intensity 9A^2" or 9I) and when pi out of phase destructive interference (so amplitude 2A-A=A so intensity I)