Provable Guarantees for Nonlinear Feature Learning in Three-Layer Neural Networks