Wrong subject after an “-ing” clause
Answer B is correct.
In written English, we sometimes start with a subclause that includes “-ing”:
Arriving at the hotel,... These subclauses do not tell us who the sentence is about, i.e. the subject of the verb has not yet been given. The person (the subject) comes immediately after the comma, at the start of the main clause:
Arriving at the hotel, we were greeted by a friendly receptionist.
A common mistake is to have different people (subjects) in the two clauses: Arriving at the hotel, a friendly receptionist greeted us.
Here, it sounds as if the receptionist is arriving, not the guests.
Our tip: This is a very common mistake and your meaning will usually be understood from the context, but there is potential for confusion. To avoid it, proofread your texts carefully and keep asking yourself who’s doing what.