You don't have to publish the frame out (and then have to wait with the tf subscriber to get what you already know returned back to you), you can create a local tf2 BufferCore and set needed transforms within it then query their relationship as if it was a tf listener buffer. This will be faster, and if you already know how to do tf lookups you can continue to use that interface, avoid any error prone transform math in your node (though you have to be careful with the initial setting of transforms still).
For your particular problem you convert your Poses into Transforms and set them into the buffer core, and you could do a regular tf listener lookup between your base_link and pose1 and set that into the buffer_core, then set your pose1->pose2 transform, after that you can look up base_link->pose2. You could make all the transforms static if nothing is changing over time for the duration you care about.
There isn't a ton of documentation or examples but I've made this (maybe a handful of other answers here):
https://github.com/lucasw/tf_demo/blo...