While Salamence is on the ground it'll shoot lasers at you. Tap the screen in front of it to fake it out and get it to attack, then draw a single loop quickly and let it go. It should make an earthquake, then start flying around, at which point you can capture it. If you touch it too many times it'll land and make another earthquake.