The radii of the base of two cylindrical tins, P and Q are r and…