Some relative isoperimetric inequalities and applications to nonlinear problems