How to Extend and join walls?

I am trying to find a way to join walls,
I would like to find formula if wall is within 300mm then extend and join

I selected two perpendicular walls and try to use Hot Gear but it did not work,
Any advice would be appreciated