It was in the 5th episode of the 5th season of The Office.
Here is the context: Pete: That’s perfect. You know what would be even more hilarious? Remember that thing we did when Jim was in high school with his girlfriend? Tom: Right! That would be hilarious! We should totally dog her, about being an artist, never making any money!