This achievement requires you to win by less than .02 seconds. From my experience in trying it .02 doesn't count it has to be under .02. The best way I found was to just let off the gas near the end of the race and let the driver in second catch up. Once they get to you attempt to pin them to the wall so they can't get by and if done correctly you should win. Any race length or difficulty will work the only rule is it cannot be an online race. It probably will take quite a few races to get this down perfectly so I suggest to pick a very short race such as bristol so if you don't get it a lot of time is not wasted to do it over.
From BPBPBP:
Using Indianapolis Motor Speedway:
This backstrech has the finish line 3/4 of the way down, making the speed high and easy to get close finishes. If you learn to get the other achievement here (slingshotting for the win), all you have to do is throttle the gas near the line and keep the opponent slightly behind you. The whole 3 lap race can be done on EASY with assists, (I don't use auto brake and only had 2 stars on brake spinout I think) and takes less than 3 min.