In answer to your question, Rand did a great article on this a while back as a follow on to a white board friday session.- http://www.seomoz.org/blog/understanding-root-domains-subdomains-vs-subfolders-microsites
There are also multiple other questions of a similar nature.
http://www.seomoz.org/pages/search_results?q=sub+domain+vs.+subfolder
The general consensus seems to be sub-folder over sub-domain. As Sub Folders tend to get all the benefits from the root domain.
To quote Rand from the top article his advice:
"1 subdomain under 1 root domain (but feel free to use subfolders as it makes sense). Starting a blog? I almost always recommend yoursite.com/blog over blog.yoursite.com. Want to launch a new section of content? Use yoursite.com/newstuff rather than newstuff.yoursite.com."
So both A and B - www.domain.com/keyword
Hope this helps.