Sentence B is correct and has always been considered the correct form in traditional grammars. Nevertheless, some grammarians have begun to accept Sentence A as correct as well, especially in informal contexts. In Google or a similar search engine search on the words 'possessive' and 'gerund'.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.