Try these rules within the .htaccess file inside your document root directory:

RewriteRule ^problem/getproblems/fieldset/2/([^/]+)/([^/]+)/(.+)$ /problem/getproblems/fieldset/2/$3?$1=$2 [N,QSA]
RewriteRule ^problem/getproblems/fieldset/2/([^/]+)/([^/]+)$ problem/getproblems/fieldset/2?$1=$2 [L,QSA]

The very first rule is perfect for the recursion and also the second rule finishes the recursion.

Certainly something similar to

^(.*)\?(search)=(.+)&(rows)=(.+)&(page)=(.+)$ $1/$2/$3/$4/$5/$6/$7

works, but regardless of whose answer you follow, you'll always have to tweak it for your situation, so you must know how it operates.

http://httpd.apache.org/docs/2.2/rewrite/rewrite_intro.html#regex, http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html and something similar to http://civilolydnad.se/projects/rewriterule/ will enable you to get a lengthy way.