The sides of a triangle are in A.P. One of the angles of a triangle is $120^\circ$. The sides of the triangle are in A.P. Find the ratio of the sides.

 \begin{align} 3:5:7 \end{align}

So the solution in my book:
Let the sides are $a-d,a,a+d$ where $a>0,0<d<a$. Obviously the angle opposite to the largest side is $120^\circ,$ so we can write: $(a+d)^2=a^2+2a(a-d)\cos120^\circ$ and we get $d=\dfrac25a$. So the sides are $\dfrac35a,\dfrac55a, \dfrac75a$.
I would like to ask why we can write the arithmetic progression in this way WLOG. And why do we do so? What do we get from it? Why the restrictions $a>0$ and $0<d<a$? Thank you in advance!
 A: As a general rule, it is usually a good idea to parametrize the problem in the simplest way possible. Naming the middle element of the arithmetic progression $a$ and the difference $d$, it is $a-d, a, a+d$. You may assume that the difference is nonzero (otherwise the triangle is equilateral having no angle of size $120^\circ$). Assuming the difference to be positive is then nothing special: if it were negative, you would just list the sides in the reverse order. The side $a$ has to be positive, as it is the side of a triangle. Finally, if $d\geq a$, then the side $a-d$ would not be positive.
A: If $3$ terms are in AP (arithmetic progression), you may list them down as $$a, a+d, a+2d$$ where $a$ is the first term and $d$ is the common difference. This is what you usually do, i.e. based on the fact that the $n$th term of an AP with first term $a$ and difference $d$ is $a+(n-1)d$
Now, I'll show you why you can switch to the other notation WLOG. Substitute $a + d = b$. The three terms are now:
$$b-d,b,b+d$$ which look like what you want. This can be done WLOG because you can always find a $b$ such that $b = a+d$.
Why is this a good idea?
A lot of times when dealing with APs, one wants to talk about the sum of the terms. Choosing variables in a way that the sum looks simpler, makes your life easier.
If you have an odd number of terms, consider choosing variables such that the AP looks like:
$$\ldots,a-2d,a-d,a,a+d,a+2d,\ldots$$
If you have an even number of terms, consider choosing variables such that the AP looks like:
$$\ldots,a-3d,a-d,a+d,a+3d,\ldots$$
Note how in the even case I've chosen a difference of $2d$ instead of $d$. Convince yourself why you can always do this! (the argument is similar to the above one about choosing representation WLOG)
