Judy, I was waiting for some of the guys who floor for a living but they must be busy. Also this is a learning forum for the entire public so no emails.
Using a square and a carpet knife, cut the carpet out for a rectangle an inch or so smaller all around than your vinyl size you want. Clean up the floor. Cut the vinyl an inch or so larger all around than the size you want to end up with. Glue it down with the glue recommended by the vinyl manufacturer with their recommended trowel. Remember different brands and types of vinyl use different glues.
Nail down your metal trim overlapping the vinyl. Stretch the carpet over the edging and push it down so it is hooked tight. Trim off the excess. Get a 2by4 longer than the metal trim and lay it on the metal trim(so it bends over evenly) and knock the edge down over the carpet. Do this on all sides. A rubber mallet is handy to keep from bending.