Since x is measured from the center, that means that x=0 is the center so the edges of the rod correspond to x=-6 and x=6. that meas that the total charge can be calculated as
separating the integral from -6 to 0 and from 0 to 6, taking into account that |x|=-x for x<0 and |x|=x for x >=0, we get
using the substitution x=-u in the first integral we get
which is the same as the first integral. Thus, the total charge is given by