I'd be really interested to see what you've tried. Anyhow, and in particular, for the symmetric group where conjugacy classes are well known, you can easily examine orders of their representatives:
gap> 15 in List(ConjugacyClasses(SymmetricGroup(10)),c->Order(Representative(c)));
true
Moreover, you can use the character table library without even constructing the group itself:
gap> 15 in OrdersClassRepresentatives(CharacterTable("S10"));
true