Can elbow fitting be used to line up drain tailpiece with trap
The best repair for this problem is to cut the trap from the drain pipe, glue on an ABS 1 1/2 inch (or same pipe diameter as existing pipe) coupling and than a short section of new pipe long enough to bring the trap under the sink tail piece.
You wll have a little bit of leeway because the trap section can pivot from the threaded connection.