How do I fix where cat scratched and tore carpet from threshold?
A typical way to fix this type of damage depends upon having a remnant available. Repair consists of cutting back from the door to good solid carpet material using nice straight edges. A replacement piece is cut from the remnant to fit and then joined to the original carpet using a hot melt carpet splicing tape. (Special tools are required for this process that can be rented in lieu of having to purchase them).

If no remnant is available then your choices become a bit more drastic including the following:


The possibility to borrow a chunk of carpet from another part of the existing installation. Possibility could be to remove carpet from a closet for the repair and then re-do the closet in tile. 
Full up replacement of the carpet in the office with something new. A new spring time update may be just what is in store anyway.
Conversion of the office space from a carpeted floor to some other style. One possible style could be a laminate floor.