This is what I can think to do:
-- Important variables
CamX = memory.readdword(0xffee00)
CamY = memory.readdword(0xffee04)
-- After, set camera's position in Tails an capture screen
memory.writedword(0xffee00, memory.readword(0xffb048) - 240)
memory.writedword(0xffee04, memory.readword(0xffb04c) - 112)
TailsCam = gens.gdscreenshot()
-- After, set camera's position in Sonic an capture screen
memory.writedword(0xffee00, memory.readword(0xffb008) - 160)
memory.writedword(0xffee04, memory.readword(0xffb00c) - 112)
SonicCam = gens.gdscreenshot()
-- Finally draw the pictures and set the camera's position to original.
gens.drawimage(-160,0,TailsCam)
gens.drawimage(160,0,SonicCam)
memory.writedword(0xffee00, CamX)
memory.writedword(0xffee04, CamY)
I dont know if it is well written, but this should work. But i dont know in what event run it. Maybe someone could make it any arrangement.