Diagnosing Triggered Star Formation in the Galactic H ii region Sh 2-142