This could be done using calculus (take the derivative and set to 0.0), but note that the maximum daylight hours will occur when the cos function equals -1.
Cos(y) = -1 when y = pi radians, so
2*pi*{x+10) /365 = pi
Solving for x gives ( 2*x +20) / 365 =1
Or
x = 172.5 days
So days 172 and 173 will be the days with the most daylight.