You have your old and new direction vectors, so the problem is simply a matter of building the rotation matrix to rotate the first vector onto the second. You use the cross and dot product to get the rotation axis and angle.
Assuming that oldV and newV are normalised:
axisOfRotation = crossProduct(oldV, newV).normalise(); // Depending on whether your library requires normalised rotation axes
angleOfRotation = arccos(dotProduct(oldV, newV));
Whatever library you're using should have a function that builds a rotation matrix from an axis and angle of rotation, so there's no need to manually code a whole bunch of math.