If you attempt an armbar but your opponent pulls his arm out, a good option switch to a triangle. The leg that passed over his head to attempt the armbar switches to the other side of his head. Square up, close the distance, and pull on his head to finish the triangle.
1) Triangle Transition
2) Triangle Finish