Square mesh to match the triangular mesh points

Hello friends, have a good time
I wanted the square mesh to match the triangular mesh points. How can this be done?
example 2.gh (25.5 KB)