Can such an operation be done with two stacks?
You do not need more operations. In fact, you do not need DUP and DROP, either. All you need are SWAP, PUSH and PULL.

The list of states of main stack below shows how the initial state 1 a 3 p q r 2 x y is changed to 1 a 2 x y 3 p q r. The auxiliary stack is at left hand side growing to the right from its bottom at the very left. The main stack is at right hand side growing to the left from it bottom at the very right. &lt;- means PUSHing to the auxiliary stack and -&gt; mean PULLing from the auxiliary stack.

   &lt;- 1 a 3 p q r 2 x y  //initial state
 1  &lt;-  a 3 p q r 2 x y
 1 a  &lt;-  3 p q r 2 x y
 1 a 3  &lt;-  p q r 2 x y
 1 a 3 p  &lt;-  q r 2 x y
 1 a 3 p q      r 2 x y  //then SWAP
 1 a 3 p q  -&gt;  2 r x y
 1 a 3 p      q 2 r x y  //then SWAP
 1 a 3 p  -&gt;  2 q r x y
 1 a 3      p 2 q r x y  //then SWAP
 1 a 3  -&gt;  2 p q r x y
 1 a      3 2 p q r x y  //then SWAP
 1 a  &lt;-  2 3 p q r x y
 1 a 2  &lt;-  3 p q r x y
 1 a 2 3  &lt;-  p q r x y
 1 a 2 3 p  &lt;-  q r x y
 1 a 2 3 p q      r x y  //then SWAP
 1 a 2 3 p q  -&gt;  x r y
 1 a 2 3 p      q x r y  //then SWAP
 1 a 2 3 p  -&gt;  x q r y
 1 a 2 3      p x q r y  //then SWAP
 1 a 2 3  -&gt;  x p q r y
 1 a 2      3 x p q r y  //then SWAP
 1 a 2  &lt;-  x 3 p q r y
 1 a 2 x  &lt;-  3 p q r y
 1 a 2 x 3  &lt;-  p q r y
 1 a 2 x 3 p  &lt;-  q r y
 1 a 2 x 3 p q      r y  //then SWAP
 1 a 2 x 3 p q  -&gt;  y r
 1 a 2 x 3 p      q y r  //then SWAP
 1 a 2 x 3 p  -&gt;  y q r
 1 a 2 x 3      p y q r  //then SWAP
 1 a 2 x 3  -&gt;  y p q r
 1 a 2 x      3 y p q r  //then SWAP
 1 a 2 x  -&gt;  y 3 p q r
 1 a 2  -&gt;  x y 3 p q r
 1 a  -&gt;  2 x y 3 p q r
 1  -&gt;  a 2 x y 3 p q r
      1 a 2 x y 3 p q r  //final state


Once you have checked the above procedure, you will understand how to proceed in the general situations. In fact, what have been shown above is, basically, the well-known fact that if you can swap any two adjacent elements in an array, you can sort all elements in the array into any permutation you wanted.