In the end, this one ended up being particularly fun!
I tried to make this as dynamic as possible. The only manual config is the Select Rows tools to pick out which rows are from which table and cleaning up one field at the end from the bigger output.
Can't help but think I overcomplicated it. Nothing particular strenuous or mind-bending but it took a long time to configure.