The correct answer is B. The object of a preposition
Explanation
The object of the preposition is a noun or a pronoun that completes the meaning of the preposition. Some prepositions are: by, above, behind, in, outside, under, among others. On the other hand, a gerund is the non-personal or impersonal form of a verb that ends in "ING", for example, swimming, walking, watching, playing, among others. According to the above, in the sentence presented swimming a gerund and is used as the object of the preposition "by" because it completes the meaning of this preposition. So, the correct answer is B. The object of a preposition