The part that you are talking about had already been taken without a resistence of Indian Army,as Kashmir was still an independent state.It was at this point that Hari Singh acceded to India,due to Pakistani aggression.After the accession,Kashmir became Indian territory and Indian army marched in.After that,the Pakistani forces could not advance any more.
So,the Indian army didnt loose,its Pakistani army which failed to gain after the Indian army came into action.
You have to get your history and timelines straight.