How to composite 3d elements into an image?

Hey guys,
Well the title says it all.So as the story goes,I took an hdri and it’s matching backplate from harniman’s free assets.Then loaded the hdri in blender matched the refelction on the car with that of the backplate.I put a plane beneath the car and also a sun lamp for a little more strength on the reflection.Now I go to the render settings and I check transparent so the hdri is not rendered.So now I have the car in a render layer the plane in another.I am not sure if this is even the right way to do.So I am stuck here.Please help me.If there is a tutorial for this please refer.Thank u.Hoping u got me.

Don’t set the hdri image to transparent, because then it will be invisible. Rather, set it transparent only for camera rays. You can do this by taking a mix shader node, use a transparent shader as one input and an emission shader as the other. Then use the IsCamera ray from the light path node as factor input.