Commas are a punctuation mark that are used for two things; divide words in a set and also, set a pause within a sentence when no period is being used. There are several cases in which you use a comma. Some of these are: when using coordinating conjunctions, like and, for, but, etc. After a dependent clause that starts a sentence, to separate items in a sentence, after introduction adverbs like However, when you are going to use quotations and also when after using information like dates or city-states, among others.
In this particular case, we have two clauses. One where the subject, Josephine, is mentioned, and the second clause, which is preceded by a connecting conjunction, which is <em>but. </em>Given the rules mentioned before, since these two clauses are joined by the word "but", the comma must precede the coordinating conjunction. This is why the correct answer is B.