All you need to do is make 5 smaller the closer you get to your final position. This can be done several ways. I'm not sure on what may be the most efficient though. It also depends on what the rest of the code is doing.One way is this.
if( position.x < finalPos.x * 0.6f)
position.x += 5; // Move normal speed until 60% of way to final position
else if( position.x < finalPos.x)
position.x += 2; // Move slower to final position
This only works when moving in the positive direction and you start at 0, though. You could also try making the 5 a number that gets smaller the closer the position gets to the end.
position.x = (finalPos.x - position.x) * 0.6f;
//Move 60% of the way to final position.
As long as you get the idea you can make it fit what you need. Hope I helped.