For ease of writing, let us subst.
#(alpha+beta)/2=u, (beta+gamma)/2=v, &, (gamma+alpha)/2=w#.
By Given, then, #cotu+cotv+cotw=0#.
#:. cotu+cotv=-cotw#.
#:. cosu/sinu+cosv/sinv=-cosw/sinw#.
#:. (sinvcosu+sinucosv)/(sinusinv)=-cosw/sinw, or, #
# sin(u+v)/(sinusinv)=-cosw/sinw#.
#:. sin(u+v)sinw=-sinusinvcosw, or, #
#:.2sin(u+v)sinw={-2sinusinv}cosw#.
#:. -{cos(u+v+w)-cos(u+v-w)}={cos(u+v)-cos(u-v)}cosw.#
#:. color(red)(2cos(u+v-w))color(blue)(-2cos(u+v+w))=2cos(u+v)cosw-2cos(u-v)cosw,#
#={color(blue)(cos(u+v+w))+color(red)(cos(u+v-w))}-{color(green)(cos(u-v+w))+color(magenta)(cos(u-v-w))}.#
#:. color(red)(2cos(u+v-w))-color(red)(cos(u+v-w))+color(green)(cos(u-v+w))+color(magenta)(cos(u-v-w))#
#=color(blue)(cos(u+v+w))+color(blue)(2cos(u+v+w)), i.e.,#
#color(red)(cos(u+v-w))+color(green)(cos(u-v+w))+color(magenta)(cos(u-v-w))=color(blue)(3(cos(u+v+w))#.
Here, #(u+v-w)=(alpha+beta)/2+(beta+gamma)/2- (gamma+alpha)/2=beta#,
#u-v+w=(alpha+beta)/2-(beta+gamma)/2+(gamma+alpha)/2=alpha#,
#u-v-w=(alpha+beta)/2-(beta+gamma)/2-(gamma+alpha)/2=-gamma#, and,
#u+v+w=(alpha+beta)/2+(beta+gamma)/2+(gamma+alpha)/2=alpha+beta+gamma#.
Accordingly, there follows the desired result :
#cosbeta+cosalpha+cos(-gamma)=3cos(alpha+beta+gamma), or, #
#cosbeta+cosalpha+cosgamma=3cos(alpha+beta+gamma)#.
Feel & Spread the Joy of Maths.!