You rename things in liblua.a from version 5.0. to something different (append __5.0 to names or something), then in the .a file that should link to version 5.0, you rename all missing Lua symbols too. Then you link all this together:
main.o
component_for_lua5.0.a (modified: referenced Lua symbols renamed)
component_for_lua5.2.a (with symbols left intact)
liblua.a (from version 5.0, modified: symbols renamed)
liblua.a (from version 5.2, its symbols left intact)
There should be no more name collisions.