i need help with a question, other people tried to help me, i just cannot get it! its driving me crazy:grumpy:

Two positive numbers have sum n. What is the smallest value possible for the sum of their squares?

so i have n=x+y

x>0 y>0

y=n-x

we want to minimize S S=x^2+y^2

S=x^2+(n-x)^2

S'=2x-2(n-x)

S'=2x-2n+2x

S'=4x-2n

now ???????? The above is what I have been shown to do... the red part doesnt make much sense to me... Can someone please help me to continue on...