Compression fit necessary for waste pipe
Your forth photo is not correct, the fitting in the photo is a sanitary tee and is not used in that location. there should be one in the wall and that is what the waste pipe is glued to.

Your third image is correct except you need a 1-1/2-in dia PVC Trap Adapter Fitting



to glue onto the waste pipe coming from the wall. It glues on to the waist pipe and has treads to accept the compression nut you have with your p trap kit. You will then slide the p trap pipe into the adapter and compress the washer to the adapter by tightening the compression nut to the adapter.

To account for an off center p trap alignment you can swing the p trap sideways ( if it is not to far off center ) and then adjust the length of the pipe going into the waste adapter. You may need an extension or to cut to length depending on how close you are. If you are to far off center you can use a flexible pipe, i do not like them and avoid them if i can. i prefer to use solid glued pipe and 45% fitting. ( Or a 90% elbow and come at from the side. )

If that is what is required then you need to extend the waste pipe out with a 1 1/2 inch coupling to the distance needed to come into it from the 45% angle, on the end of this pipe you put the 45% fitting then  another short section  1 1/2 pipe and the adapter glued on to that so you can run the p trap pipe into it. 
( try to make this short section of pipe long enough so that if in the future you have to cut it to make changes you have enough to glue a new fitting to. )
 Dry fit everything, this will take some thought and planning, since the p trap is swing-able you have some leeway for the waste pipe extension. Make all your cuts and dry fit it all together BEFORE YOU GLUE. If the distance from the p trap to waste pipe extension is to great you can buy a slip joint extension to bridge the distance. It works on the same compression principle and you cut it to the proper length. 

BE AWARE : when you dry fit you can not get as tight a fit as when you glue I.E. When you glue the distance will change slightly because the pipes and fittings will slide further onto/into one another. I try to account for this when i make my cuts but because the p trap swings you have some wiggle room. 

There are many angles here and therefor more than one way to skin this cat. Try to keep the number of turns that the water has to make to a minimum to insure a better flow. I find it is better to buy all the fittings and pipe i might possible need and take back what i do not use to avoid multiple trips to the store.