For this case what we should do is fill in the blank with the correct word.
Translating the sentence in Spanish we have:
When I go to the beach to swim, I need a __________.
The options available in English are:
bathing suit
boots
coat
blouse
Therefore, by completing the sentence we have:
When I go to the beach to swim, I need a bathing suit.
The translation of the sentence in Spanish is given by:
Cuando voy a la playa para nadar, necesito un traje de baño.
Answer:
traje de baño
Cuando voy a la playa para nadar, necesito un traje de baño.