Option A :- correct
This option is correct, swimming is the subject and if the subject is in the form of verb+ing and it takes always singular verb. The gerund ('ing' ending verb) follows the proper parallelism. .
Option B :- Incorrect
This option suffers from wrong verb tense. The gerund is not used well too.
Option C :- Incorrect
He had is incorrect, why is this so?
Since there is no sequence of two occurrence. It is important to know that the two events have to be closely related and the above are different occurrence.
Option D :- Incorrect
Costing him- present participle. Which is grammatically wrong because the gerund does not correlate.
Option E :- Incorrect
Here, the actual meaning was altered, while swimming across he came across at a cost.