I don't have 2 animated GIFs of the same length, so I just use two copies of this:

Look at the frames there:
identify 1.gif 1.gif[0] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[1] GIF 449x339 500x339+51+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[2] GIF 449x339 500x339+51+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[3] GIF 449x339 500x339+51+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[4] GIF 448x339 500x339+52+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[5] GIF 449x339 500x339+51+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[6] GIF 448x339 500x339+52+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[7] GIF 448x339 500x339+52+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[8] GIF 448x339 500x339+52+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[9] GIF 448x339 500x339+52+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[10] GIF 448x339 500x339+52+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[11] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[12] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[13] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[14] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[15] GIF 448x339 500x339+52+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[16] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[17] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000
Mmmm, 18 frames of different sizes, this means that we need to use -coalesce to restore partial frames to full ones.
Copy this and do 2.gif
cp 1.gif 2.gif
Now we can split the two gifs into their components, for example:
convert 1.gif -coalesce a-%04d.gif # split frames of 1.gif into a-0001.gif, a-0002.gif etc convert 2.gif -coalesce b-%04d.gif # split frames of 2.gif into b-0001.gif, b-0002.gif etc
Now attach the individual frames side by side:
for f in a-*.gif; do convert $f ${f/a/b} +append $f; done
Note that ${f/a/b} is a bash -ism value meaning "takes the value f and replaces the letter" a "with" b ".
And return them again:
convert -loop 0 -delay 20 a-*.gif result.gif
It looks longer and harder than because I tried to explain all this, but it looks like this:
convert 1.gif -coalesce a-%04d.gif

Please note that this concept code is not product quality. It does not delete the temporary files that it creates, and does not carry time between frames forward from the original GIF. If you want to get the original frame rate, you can get them that way and save them in an array and return the delays to the re-animation command at the end:
identify -format "%f[%s] %T\n" 1.gif 1.gif[0] 8 1.gif[1] 8 1.gif[2] 8 1.gif[3] 8 1.gif[4] 8 1.gif[5] 8 1.gif[6] 8 1.gif[7] 8 1.gif[8] 8 1.gif[9] 8 1.gif[10] 11 1.gif[11] 11 1.gif[12] 11 1.gif[13] 11 1.gif[14] 11 1.gif[15] 11 1.gif[16] 11 1.gif[17] 26
In addition, you may need a spacer between two animations, for example 10 pixels, which you can do by replacing the convert command inside the for loop as follows:
convert $f -size 10x xc:none ${f/a/b} +append $f
