We have two particles and the distance between them is fixed, let's suppose we know the coordinates of one particle (2,1) and other particle (x,2). So using distance formula (let's suppose the fixed distance between the particle is 4) we can find $x$,so we don't need four coordinates to specify the system, we just need 3, we can find the other. So no of independent degrees of freedom we have is 3. (let's suppose the motion is in a plane).
But solving the equation we get two solutions, I don't know which one to take?
Here is quote from wiki to clearfy what I mean.
If two particles in space are constrained to maintain a constant distance from each other, such as in the case of a diatomic molecule, then the six coordinates must satisfy a single constraint equation defined by the distance formula. This reduces the degree of freedom of the system to five, because the distance formula can be used to solve for the remaining coordinate once the other five are specified.
but I get two solutions for after solving the equation.