You'll need to set up a subdomain with your domain provider and point it to your hosting account. If you have shared hosting you may need a separate account for the subdomain, check with your hosting provider.
After that, you can set up redirects for the old URLs (e.g. yourdomain.com/qa/) to the subdomain (e.g. sub.yourdomain.com) using htaccess. There are plenty of tutorials for that online.