Given an undirected unweighted graph and two nodes A and B, I've got to find a path from A to B and then a path from B to A. I can't visit a node more than once (with the exception of node A, that must be visited at the beginning and at the end). I have to determine the maximum number of nodes that can be visited with such paths.
In other words, I have to find a cycle that contains A and B and touches the maximum number of nodes.
Any hint?

Ciao
Alessandro