The general rule for differentiation is multiply by the power and decrease the power by one.
So if we take each term individually starting with 5x^2, and multiply by the power giving 10 then reduce the power by one hence 10x. Similarly for the next term, multiply by 1 and then reduce the power giving -7. When differentiating a constant term, as x is to the power of zero, when you multiply it by the power it will be zero. Thus leaving us with the answer of 10x-7