Think of a relay race. The runner approaches with the baton. His successor runs alongside him for a while, matching the runner's speed, so that they can easily pass the baton.
That's basically it.
However, you have correctly added that this means that the supply ship would need to match the velocity of Hermes, which, as was established in the movie, needed a slingshot around Earth to achieve such a velocity.
However, do not ignore mass differences:
Acceleration is directly influenced by the mass of the accelerating object.
If the Hermes were to race against a ship that has half the mass; and they use the exact same thrust, the smaller ship will accelerate twice as fast. Or, in other words, it would take the smaller ship half the amount of time to accelerate to a given velocity, compared to how long it would take Hermes to reach that same velocity.
The supply ship was very small (relative to Hermes), and therefore could very quickly accelerate and decelerate in order to sync up with Hermes.
I can't remember if the supply ship was manned or not. Assuming it was not manned, this means that the supply ship does not need to limit its acceleration to the G force that a human body can withstand. An unmanned ship is therefore less constrained, and can accelerate at full blast (depending on the structural integrity of the ship)
Imagine the same relay race. The current runner, holding the baton, is an elephant. The successor, who needs to match the elephant's speed, is a cheetah. Obviously, the cheetah needs considerably less warm up time to accelerate and match the elephant's speed.
Compare this to the second relay team, which only consists of elephants. The successor, also an elephant, needs to start running much earlier than the cheetah, because he can only accelerate at a lower rate. He takes more time* so that he can accelerate up to the same velocity (= the runner's velocity), and only then is able to make the hand off.
*And the elephant also runs a longer distance than the cheetah while getting up to speed; which is a slightly more appropriate analogy for the Hermes/supply ship scenario, which was limited by the amount of Hermes' orbit being in lower Earth orbit.
That is a more accurate comparison of the Hermes and the supply ship; since their mass (and therefore means of acceleration) is very different.
Why not just send the supply ship then, since it is faster?
First of all, the supply ship is not faster (= higher max speed). It accelerates faster (= reaches max speed faster).
Think of it like a van and a Lamborghini driving on a highway at the maximum legal speed. The Lambo will reach the maximum speed much faster than the van; but once the van has reached maximum speed too; both cars will travel at the same speed. If you are making an incredibly long journey, the difference between travelling in the Lambo or in the van are negligible.
For the pedants: there is no max speed for any spaceship (other than the physical limitation of lightspeed) from a physics perspective. However, there are limitations as to travel speed from an engineering perspective. Most notably fuel costs, the risk of overshooting, and the ship hull's structural stability.
Secondly, while the supply ship is faster, it is not capable of sustaining human life for long enough, since the ship itself if too small. Yes, it carries the food supplies (and presumably oxygen and CO2 filters and the likes), but it is not a fully functional ship like Hermes is.
For the same reason, a rock band travels in a tour bus instead of a small hatchback. Even though the hatchback is a bit faster through traffic; could fit 4 band members, the manager, and the equipment on the roof; and is considerably cheaper to build and operate, it's simply not a viable option for an extended journey.
A small hatchback is not made with long journeys in mind. It is made to be small, efficient, and a good car for short distances in urban environments.
Similarly, the supply ship is not built for an extended journey. It may be able to do its job by using a single battery, without any means of power generation, since it never stays in orbit for very long. If unmanned, it has zero accomodations for human life (space to live, air to breathe, ...). Maybe it doesn't even have a safe way of returning to Earth or even surviving reentry, because it's simply not worth the cost of developing those features.
Just because the supply ship could get there, doesn't mean that it's the best vehicle to use for the journey. It doesn't even necessarily mean that it's viable to do so.
Edit A small mention. Maybe you already figured this out, and this is the source of your question. Maybe not. I'll add it anyway, maybe for future readers.
If the supply ship had matched Hermes' velocity, delivered the goods, and then did not slow down or alter its course in any way; assuming Hermes also did not alter its course, the two ships would have travelled side by side and would have reached Mars at the same time.
So the core of your question, the supply ship being able to get to Mars just as quickly, is correct. You have simply forgotten to take into account the necessary machines and ship capabilities in order to sustain human survival for the entire time that the journey will take.