I am going to give a cat back to their previous owner without telling them.
Why are you wanting to return a cat? Is there some kind of problem with the cat? Does the previous owner want the cat back?
Yes, she's always wanting attention and I find it annoying
The cat wants attention, or the previous owner? It's wrong for the previous owner to take the cat back after giving/selling it to you. But it's also wrong for you to want to give it back after agreeing to take it.
Seriously, I only took the cat because I was so lonely.
I can understand your feelings, but pets need attention too. If you weren't prepared for the responsibility that comes with owning a pet you shouldn't have agreed to it. Going forward you should discuss things with others before you decide to commit to it.