Let FJ30 = pints of the 30% fruit juice
FJ55 = pints of the 50% fruit juice
then,
FJ30 + FJ55 = 180
and (30*FJ30 + 55*FJ55)/(FJ30 + FJ55) = 40 or (30*FJ30 + 55*FJ55) = 40(180) = 7,200
so FJ30 + FJ55 = 180 or 30*FJ30 + 30*FJ55 = 5,400
and 30*FJ30 + 55*FJ55 = 7,200 and 30*FJ30 + 55*FJ55 = 7,200
Subtracting, we have
25*FJ55 = 1,800
or FJ55 = 72 (pints of the 55% juice)
and FJ30 = 180 - 72 = 108 (pints of the 30% juice)