In Image 2 we see the plan. If we get a scrap piece of wood, a few screws, and screw through “A”, through the holes into the wood holding A to B. If it is not important and not a structural thing it can be left like this. Its up to you.
If B is steel you would need to drill holes.
This is just intended to be a quick fix. A simple idea to get the job done until we can get nut and bolts to do the job more securely.
Hope this helps. Store the idea in your mind for the future.
All the best from
James M Sandbrook.
19th of April, 2021.