At the start, where x=0, you want kx=0 which is true for all k.
At the finish, where x=10, you want kx=2pi. That is k*10 = 2pi or k = 2pi/10 = pi/5. So you now have y = A(cos(pi/5*x))+C. A=3 (not -3, since A equaling a negative number implies that (in this case) the cosine graph you have is in fact a -cosine graph. You have the graph of a positive cosine.
How you got (π/5x - 5π/5) puzzles me since even if it is correct the problem demands that the angle be in the form of kx, NOT kx+b. So that angle has to be wrong as it is not in the correct format. Do you see that? Even if you do not know how to do this problem you need to see that your answer must be wrong. There is no question about it. It is in the wrong format!!