This is generally a late-game strategy. At the point where you'll be able to set this up, you and your opponent have likely traded most of your pieces and the board is much more developed. If your opponent's king is on the back row, move one rook to the second to last row or "rank" to trap them there. From there, you just have to move your second rook into place and you'll get this achievement.
I got this cumpletely by accident. I don't know the circumstances, though it was likely me just taking an opponent's piece or their piece was in my way. Achievements such as this are pretty easy to obtain once you have a modicum of skill or experience at playing chess.