OK, I think I have a solution, but I'm not sure I can explain it adequately.
First, hang the string on one nail (right nail), and then hang both ends of the string around the other nail (left nail). This results in the string but supported only by the right nail.
Then, take one end of the string, underneath both nails, around the right nail, and down through the middle.
The result is that if you look at the ends of the string with regards to each nail independently, the end of the string is to the left of the nail.
I hope it was satisfying to solve. I've got more. Can you do it for three nails? (Hang so that removing any nail makes the picture fall down.) This is more difficult so it would be good to make sure you understand the previous solution.