i know for sure because i have test it in order to do the demon tasks you need to win the monster no matter if you are in a party sharing exp, if you dont win the monster doesnt count
But for bestiary you only need to attack the monster dont even need to be in party with another person you could be doing ks on a person and still will be doing bestiary but for tasks you have to win the creature