what moment formula should I use ?

I'm working on a design analysis of a multistorey building(residential)
I'm totally new to this then I came across this when I started to design beams . . .
pic
1)how do I know if 1 end is restrained or unrestrained ?
2)a and b conditions under negative moment seems the same, which am I supposed to use ? can someone cite an example as to when exactly this formulas are to be used because although it was explained there in text, I somewhat can't fully understand their conditions.

Let me explain with the use of an example. Consider a concrete T-beam along the span A-B-C. This is similar to CE Board Exam Nov. 2012 problem.
 

aci-code-ln.gif

 

At the supports, the moment is negative and at the midspans of AB and BC, the moment is positive.

The moment at support B is under this code description: Negative moment at exterior face of first interior supports for two spans, Mu = wu Ln2 / 9

For the positive moment at midspan, it is under this definition: End span, when discontinuous end integral w/ support, Mu = wu Ln2 / 14

I hope it helps.

Well explained by sir Romel. In addition to that, if you are designing an actual building, I will recommend using Three Moment Equation (examples with different situations are also presented in this site, appreciation goes to the author) for a more economical section and/or number of bars furnished. ACI moment is a fast way to solve the moments of a considered span or continuous which meets the code restrictions.