Method to find relation between 2 nodes added