EASY answer
Knowledge of types of clauses
Topic: Mary is trying to swim in the sea alone. She should never have been allowed to do that.
D. Someone should have stopped Mary from trying to swim in the ocean alone like that.
Consider the remaining answers:
A. When Mary left to go swimming in the ocean, she said she knew what she was doing
B. It might be a mistake to let Mary swim in the ocean alone
C. No one should have been able to stop Mary from trying to swim in the ocean herself
Structures to note:
Try to do sth = attempt to do sth: try to do something
Stop sb from doing sth: stop someone from doing something
Be allowed to do sth: what are you allowed to do
On one’s own = by oneself: alone, by oneself
Could have Vp2: describes an action that could have done something in the past but in fact couldn’t
Ought to have Vp2 = should have Vp2: describes an action that should have been done in the past but actually did not.