This is a problem from Discrete Mathematics and its Applications.
I understand the basic ideas of the direct proof. Basically a proof is a conclusion from a series of steps to establish the truth of a mathematical statement. And a direct proof starts with an assumption and then works through steps to a conclusion that can be reached from that assumption. Correct me if any of this is wrong by the way, this is just my interpretation from https://courses.cs.washington.edu/courses/cse311/14au/slides/lecture07-filled.pdf, slide 8
Here is my work so far
I only introduce the variables y and r if the integer to be checked(x) is odd. y and r are just used to find one possibility of the difference of two squares. I did factoring with y^2 - x^2 and ended up with 2k + 1 = (y + r)(y-r). My question is where do i go from here equality between the terms? The structure of the problem really makes me want to solve this like a quadratic but there are three variables involved, not just one. What is the next step?