To set up the equation, we know that two-fifths of the total number of residents surveyed \( r \) is equal to 80 residents who prefer the beach. We can express this as:
\[ \frac{2}{5} r = 80 \]
To solve for \( r \), we can multiply both sides of the equation by \( \frac{5}{2} \):
\[ r = 80 \times \frac{5}{2} \] \[ r = 80 \times 2.5 \] \[ r = 200 \]
So the correct equation that represents the number of residents surveyed is:
\[ \frac{2}{5} r = 80 \]
And the total number of residents surveyed is 200 residents.