How do you hook up new black white and green wires to 2 old white wires and 2 old black wires?

Black to black and white to white, the "new" green wire is a ground wire can be put into the electrical box with a wire nut over the end