Applying the foaming resin, moulding the lining or the like, with the lining turned inside out