How to correct XY mirroring?
First of all, make sure that you have correctly identified the X and Y axes, and that the stepper motors (and end-stop switches) are connected to the correct ports. The hot end moves on the X-axis, and the bed moves on the Y-axis. If you connect the X and Y motors the wrong way round, you will get reversed text.
If the X and Y motors are connected to the correct ports, you may need to invert the motor directions in firmware. There are #define statements to allow you to do this.