What to do when I can prove a conjecture of a paper I'm peer reviewing
I was once in a very similar situation, proving a conjecture from a paper that I was refereeing. (But, unlike you, I hadn't worked on it before, and I didn't have a coauthor.) I essentially left the situation up to the editor.  I sent her my proof along with my report on the paper.  With my permission, she shared this information with the authors. It turned out that, in the meantime, someone else had also proved the conjecture, by a quite different method. He and I ended up publishing a joint paper that combined and extended both of our methods.
One warning, based on this experience: Don't get so excited about this that you overlook an error elsewhere in the paper you're refereeing.