This seems to be a very straightforward calculus I problem, so I'll present my solution in that manner. We can define a function $h(x)=kx+\sqrt{1-x^2}$ so that $h(x)$ is the height of the ladder according to the wall. With this in mind, we calculate $$h'(x)=k-\frac{x}{\sqrt{1-x^2}}.$$ Setting this to zero and solving, we get that $$x=\pm\sqrt{\frac{k^2}{k^2+1}}.$$ Since a negative value for $x$ is inappropriate for this type of problem, we throw out the solution that doesn't make sense, and we have as our final answer $$x=\sqrt{\frac{k^2}{k^2+1}}.$$