Work Advice?

I had A LOT of work to get done today. I kinda took an easy day yesterday and figured I’d make up for it today.

This morning went great. I share an office with a coworker and she was out and I was just happily working and getting things done.

And then she came in and it was just like, let’s talk all day. I didn’t want to be rude, I interrupted her at one point like, if I don’t do anything else today I need to at least get this one thing done. And then our boss came in and we all just sat around talking. And I’m sitting there like, I need to work but I don’t want to be rude.

I couldn’t stay late so I ended up getting nothing done.

I’ll probably stay late tomorrow but I want to figure out how I can still get work done and not be rude.

Any advice??