Replacing a few boards in a hardwood floor: sanding and refinishing?
If you can slide them in, then - sand, finish (top face only), assemble. You may need to use a bit of glue on the grooves in the new pieces to hold them in place.

There still may be a visible difference between the color and finish of the old and the new. The only way to get them both exactly the same is to refinish the entire floor as suggested by @python starter. But whether the difference is too much is a matter of taste.