We investigate the permutation sorting problem with two restricted stacks in series by applying a right greedy process. Instead of σ-machine introduced recently by Cerbai et al., we focus our study on (σ, τ )-machine where the first stack avoids two patterns of length three, σ and τ , and the second stack avoids the pattern 21. For (σ, τ ) = (123, 132), we prove that sortable permutations are those avoiding some generalized patterns, which provides a new set enumerated by the Catalan numbers. When (σ, τ ) = (132, 231), we prove that sortable permutations are counted by the Schröder numbers. Finally, we suspect that other pairs of length three patterns lead to sets enumerated by the Catalan numbers and leave them as open problems.