I spent 3 hours working on that paper.
If you are still working on it, I would say:その書類(しょるい)にとりかかって3時間がすぎました。
If you finished it after working on it for three hours, I would say: その書類を仕上げるのに3時間かかりました。
*There are other ways to say "working on that paper" dipending on the kind of "paper".
I like to spend time with my cats.
私はねこといっしょに時間をすごすのが / すごすことが好きです。
However, I would say: 私はねこといっしょにすごす時間が好きです。
I hope this was helpful.