On this video Photoshop expert Jesús Ramirez (from the Photoshop training channel) demonstrates how you can quickly match colors between two images in Photoshop.
So you want to bring a part of an image into another one to create a composite. But what do you do if the colors do not match (you will end up with an image that looks artificial).
The way Ramirez suggest to overcome this is by creating a curve adjustment layer, make sure you select the layer thumbnail and not the layer mask and press alt+auto button (in the right corner of the properties tab.
Select find dark and light colors and uncheck “snap neutral mid tones”. Click on the shadows and select the darkest point in the background and click on the highlights and select the brightest point in the image (make sure both will not be pure white or dark as it will not work well).
Press O.K. and then press no (don’t save them as default) and play with the curves to adjust the composite for a perfect realistic match.