Trigonometric Substitution Triangles

CpE Maj

Homework Statement

This may be basic, but how do you know which part of an integration problem fill the up the triangle values for trig substitution?