Help with simple IK problem

So Im trying to find the necessary rotation required to get to a desired joint position. I need to move only 1 bone, I have the head at a fixed xyz location and I want to find out what rotation (in quaternions if possible) should I apply to get the tail from point A to point B (as close as possible). Im having some trouble understanding how to calculate IKs but since my problem is with 1 bone at a time only, I figured there should be an easier solution. How should I aproach this? Thanks very much for the help.