Scaling law for excitons in 2D perovskite quantum wells