For the prime rib: Use the tip of a knife to make slits in the fat of the prime rib and stuff with slices of garlic. In a small bowl, mix the salt and pepper. Create a crust of salt and pepper all over the meat. Let stand at room temperature for 30 minutes.
Preheat the oven to 450 degrees F. Put the prime rib on a rack in a roasting pan.
Roast the meat for 10 minutes at this temperature, then turn the oven down to 350 degrees F. Roast until the meat registers 120 degrees F on an internal meat thermometer for a medium-rare roast, 1 hour 30 minutes to 1 hour 45 minutes (about 15 minutes per pound). Remove the meat to a cutting board, loosely tent with foil and let stand 20 minutes.
For the gravy: In the meantime, pour off most of the fat from the roasting pan, leaving about 1/4 cup. Put the roasting pan on top of the stove over medium heat. Whisk the flour into the fat and cook for 2 to 3 minutes. Vigorously whisk in the beef stock and mustard. Add the thyme, rosemary and garlic. Bring to a low boil, then reduce the heat to a simmer. Cook, whisking, until the mixture begins to thicken. Add the sherry vinegar and cook 1 more minute. Transfer to a serving dish.
Remove the ties from the prime rib. Slice the prime rib and bones and serve with the gravy.