I know this situation must seem daunting, JamesAB, but remember that you went into your TKR with a lot of issues. Those things don't resolve quickly. What does your surgeon have to say about your prognosis?
It is possible for a bad hip to influence how your knee functions. If you have a bad hip, it's not going to get any better and it's certainly not helping your knee. So I see no reason for you not to go ahead and have the bad hip replaced. Usually recovering from a hip replacement is significantly easier than a knee, so I hope that is the case with you. I do think it's important for you to share your concerns and worries with your surgeon if at all possible. Since he knows your case better than anyone, he's the best person to tell you what the possibilities are.
But, as to your question as to whether anyone else has taken 5 month to be without pain after a TKR, I can say there have been members here who experienced lengthy recoveries. In terms of a knee replacement, 5 months is really not all that long even for a person without other medical issues. I know it's hard to be patient sometimes....especially when you are hurting. But it is important to allow your body whatever time it needs to repair itself.