If there's a baseline I don't see why it should be rocket science - person X's velocity when working from home is Y and when working from the office is Z. Compare Z and Y and there you have it. Sure, it's not apples-to-apples week-to-week/sprint-to-sprint but the averages are pretty consistent.
If you don't have the baseline there are other ways of getting this figured out, not as accurate but good enough typically - instead of comparing someone's office vs. home velocity you go by the average velocity you're after and see if they can hang with that while working from home (and again, I don't see why this would be difficult to figure out).
If you don't have the baseline there are other ways of getting this figured out, not as accurate but good enough typically - instead of comparing someone's office vs. home velocity you go by the average velocity you're after and see if they can hang with that while working from home (and again, I don't see why this would be difficult to figure out).