How do we know if we are "cooperating with grace"?
You know in the same way you know you are cooperating in any other matter. You know when you are playing along with teammates in a game, or following the policies of your workplace, or following your physician's directions, or going along with a friend's preferences, or performing in a band or choir. When you do the things that are required in all these areas, you are cooperating.
So in our spiritual life, we cooperate with grace by keeping the commandments and by repenting when we break them, by making use of the means of grace, prayer, the holy sacraments, penance, and works of mercy. It's all about the love of God. If you love him and him in your neighbor, then you are cooperating with grace. Read St. John's short and beautiful letters in the New Testament, and you will see what it means to cooperate with grace. He was Our Lord's beloved friend, and friends know how to cooperate with each other.