Note that the equations you write down (here, relating two forces) are gotten by using Newton's Second Law. So, in each, there is an implicit term involving (possibly zero) acceleration. To know "which to use", depends on understanding the free-body diagram and the acceleration-vector in the problem. The only real freedom you have is choosing the coordinate axes to break vectors into components. (I see now that there are two physics problems being posed.)