Installing the drain lines to a bathroom vanity sink is actually easier if the sink drain and the pipe in the wall are not lined up. The P-trap can be offset either way to make them connect. You can purchase a longer tail piece (the vertical pipe that connects to the sink drain) or a longer waist arm (the horizontal pipe that connects the p-trap to the drain in the wall) if needed to make the pieces come together. Or it is OK to cut them shorter if needed. If the sink drain and the wall pipe are more than 4” offset then you may have to use a 45 degree fitting on the wall drain and angle the trap adapter towards the sink to make the connection.