Well, you could work out all the maths, but why not be lazy! Create a camera, animate the camera and then setPos the logic to the camera's position every frame:
// [_logic, markerPos "A", markerPos "B", 5] execVM "moveFromAToB.sqf";
// or
// moveFromAToB = compile preprocessFileLineNumbers "moveFromAToB.sqf";
// [_logic, markerPos "A", markerPos "B", 5] spawn moveFromAToB;
//
_object = _this select 0; // Object to move.
_a = _this select 1; // Initial position.
_b = _this select 2; // Final position.
_speed = _this select 3; // km/h
_speed = _speed / 3.6; // Convert to m/s
_distance = _a distance _b;
// Create a camera and animate it along the path.
_camera = "camera" camCreate _a;
_camera camSetPos _b;
_camera camCommit (_distance / _speed);
// Keep the object moving along the path
waitUntil
{
_object setPos (getPos _camera);
camCommitted _camera; // Waituntil
};
camDestroy _camera;
This opens up a lot more options to you, even if you aren't a maths wiz, by using the simple cam* animation commands to move the camera. Obviously, writing the maths for yourself will be more versatile if you are a mathematician, but if you ain't, these methods will get you a long way...