I used sandslash with rapid spin for that first Pokémon that sets up spikes (wiped it, because the ai tells them to set up spikes before anything else, and getting rid of the spikes repeatedly traps them in that loop) and got lucky that the second one I could also use sandslash for. The point is, Trial and error different Pokémon against Pokémon of theirs, and eventually you'll make it.