Valid method to prove NP completeness of a problem?
No, they're not. NP-completeness is defined using many-one reductions and you've used a Turing reduction.  The difference, in a nutshell, is that for a many-one reduction, you're only allowed to make one call to the function you've called hpn, and you must return its result as your result.  Schematically, your reduction needs to look like:

Compute a graph G' and vertices x and y from the input graph G;
return hpn(G',x,y);