You've almost amswered your own question - you say that you do most of the feeding, walking etc. for the dog. That would make him think you are his owner. I would step back and let your friend do all the feeding, walking, brushing and most of all she should join an obedience class with him to help her regain control and bonding with the dog. Don't stop being the dog's friend but make sure he associates the important things in his life with your friend.
Bookmarks