Determining maximum overlap (or minimum positional diffefrence) of two unique triangles

Let there be two triangles and only requirement is that they are not precisely same. Triangles are thrown to the 3D space and then brought together so that they overlap each other, posssibly by sharing common centroids.

One could think this problem 1) by determining orientation and positioning triangle B with triange A so that each corner is as close to other triangle corners as possible. Or other way around so that 2) areas of triangles are overlapping by maximum mean.

My question is two-fold. Are these two methods practically same and how such matching is done? Obviously shape cannot be changed, but other transformation like rotation, translation and possibly reflection can be used.

Also, could we measure the amount of transformation that is required to find out the maximum match position of the two triangles?

=================

=================

=================