Given groups $G_1, G_2, G_3$ and injections $A_1 \to G_1$ and $A_1 \to G_2$ , from $A_2 \to G_2$ and $A_2 \to G_3$, let $G_1 *_{A_1} *G_2 *_{A_2} G_3$ be the amalgam formed these groups and maps. Then is it true that $G_1 *_{A_1} *G_2 *_{A_2} G_3$ is the same as (G_1 *_{A_1} G_2 ) *_{A_2} G_3. If yes, how do we see this?
Amalgamation of groups is a categorical construction known as a "pushout": http://en.wikipedia.org/wiki/Pushout_(category_theory) By general category theory, pushouts are associative up to unique isomorphism, i.e., the two things you wrote are isomorphic in a unique way (subject to commuting with the inclusions from A_i, etc.) 

