Okay, so with the first part, 5(2y+1), you distribute the 5 to BOTH parts of what is inside the parentheses, so you have 5(2y) + 5(1). That gives you 10y + 5.
Now, for the second part of the equation. When you have that negative in front of that parentheses, that means you have to distribute it to BOTH parts of what is inside the parentheses. So, you have -(5y)and -(-2). So, you have -5y and 2. (Two negatives equals a positive, and multiplying by a negative is like multiplying by -1.
Now you have 10y + 5 + 2 - 5y
Add like terms, and you get 5y + 7.
Hope that helped!