The goal is to join two 64x32 LedMatrix panels using an Arduino Mega and not a more powerful microcontroller.
Is there any special library or command to achieve this?
You might start with a schematic, not a frizzy drawing showing how you purpose to wire it. Also part numbers and links would be very helpful. It will take to much time for me to do the research for you with the information provided.
I send attached a picture of the connection. The MEGA board and the two panels. To make the connections between the Arduino and the panel I followed this tutorial https://learn.sparkfun.com/tutorials/rgb-panel-hookup-guide/all. At the end of that web page you can also get instructions to connect multiple panels. The problem is that they use a Teensy and not a MEGA board. I hope this information would be useful.