Apache2 - Redirecting a subdomain to another URL
You could always use a simple VirtualHost:
<VirtualHost *:80>
ServerName b.website.com
RedirectPermanent / http://a.website.com:8080/
</VirtualHost>
If you prefer to go with the .htaccess file, you're just missing a % sign on the Rewrite Condition:
RewriteEngine on
RewriteCond %{HTTP_HOST} b.website.com
RewriteRule ^(.*)$ http://a.website.com:8080$1 [L]