Basically what you are trying to find, if we think it graphically, is what's the shortest piece of plot that we can gather that it repeats itself.
Meaning, what's the shortest part of signal we can gather and just copy+paste it to infinity and still get the same signal.
So. If both signals start at t=0 we need to find at what t will both signals be at their starting point again.
If one signals repeats every 3 seconds, and another every 1 second then we know t=3.
If one signal had a period of, let's say sqrt(2), and another signal a period of 1 second then you could never do it. Never ever will both signals start at the same time other than t=0. This means that your signal in effect is not periodic.
f(t) will be periodic if
f(t) = f(t+T), where T is the period.
In your example the periods are:
T1 = 2*pi
T2 = 6*pi
This means that you can fit T1 3 times into one T2. So in this case the period is the period of T2. The LCM(2*pi, 6*pi) = 6*pi
You're can also try solving the following equation:
aT1 = bT2, where a and b must be naturals and you want the minimum a and b combination that fulfills the equation. For your case this would be a = 3 b = 1. a = 6 and b = 2 would also work, but it's not minimum we can still simplify that fraction.