If your position and velocity are related (i.e. the speed is derived from the position) then they are kind of matching. In this case, if you use a simple proportional controller you can track the position but if you use a PD you are providing an extra information on the derivative of the tracked position, thus you can have a better tracking because the controller also has information about the derivative.
This approach relies on feedback on the quantities, i.e., you check the discrepancy between desired and an actual values. As noted by @fibonatic, you can use mixed approach where you apply feedback on the position and a feedforward approach on the higher derivative (so you only consider the desired values not checking against the actual ones).
If you have position and velocities which are not matching, it is physically impossible to track both for your system. The first requirement of a trajectory generator is to produce feasible trajectories, i.e. feasible pairs of position velocity w.r.t your system dynamics.
Note that in practice there is potentially an infinity of such feasible trajectories (as pointed out by @Gürkan Çetin) and you could choose the "best" one based on your criteria (minimal time, minimal energy, ...) via optimization methods if you have a good enough model.