Put a 22.5 or a 45 degree elbow in the pvc pipe and then install the trap adapter. Make sure everything lines up before you cut and glue it all together.
Put the new bend near the wall where it allows the trap to line up the best. The trap arm must remain horizontal, with not more than 1/4" per foot of pitch towards the drain in the wall.
YOU put the fitting wherever it works the best. Right at the wall might not give you enough room for the trap, and too far out may put it too far from the sink's tailpiece.