(A) Obtaining an investment-grade rating will keep the county's future borrowing costs low, protect
The correct sentence should convey the meaning as follows: Obtaining X will result in W,Y and Z. This is exactly what (A) portrays. So,
(A) is the correct answer. (B) To obtain an investment-grade rating will keep the county's future borrowing costs low, and protect
In B, the generalized structure is: To obtain X will keep W,Y and Z - such a structure has no logical meaning. Hence, it is incorrect in the context of this question. Besides, To obtain X will keep W,Y and Z - this literally makes no sense at all. So, eliminate B
(C) Having obtained an investment-grade rating will, in keeping the county's future borrowing costs low, protect.
In C, the first part of a sentence is actually intended to modify a subject. So, what follows this -ing modifier clause must be the subject that this clause tries to modify. However, we do not have a subject after this clause. Hence, C is incorrect.
(D) To obtain an investment-grade rating would keep the county's future borrowing costs low, protecting
Eliminate D for the same reasons as B
(E) Obtaining an investment-grade rating, keeping the county's borrowing costs low, would be protecting.
The correct sentence should convey the meaning as follows: Obtaining X will result in W,Y and Z. But here in (E), we have two -ing modifiers that are stacked on top of each other without any subject succeeding them. Hence, (E) is incorrect.