The correct answer is (B). Costa Rica, bordered by Nicaragua to the north and Panama to the south, has a rich history and booming tourist industry.
The phrase “bordered by Nicaragua to the north and Panama to the south” is an appositive phase that should be framed by commas as it adds additional information to the subject of the sentence “Costa Rica”.