The two people who died were trying to save a child who had been swept away in a dangerous rip current.