The mean of a collection of values is the sum of all values, divided by how many values there are.
Your values are 5.2, 8.3, 8.5, 7.7, 7.8 and y, so you have 6 values.
This means that the mean is
[tex] \frac{5.2 + 8.3 + 8.5 + 7.7 + 7.8 + y}{6} = \frac{37.5+y}{6}[/tex]
And since we want it to be 7.1, we impose
[tex] \frac{37.5 + y}{6} =7.1 [/tex]
To solve this for y, multiply both sides by 6
[tex] 37.5 + y =42.6 [/tex]
and subtract 37.5 from both sides
[tex] y = 5.1 [/tex]
So, the correct option is the second one.