We consider q-state Potts model in the presence of competing two nearest interactions and prolonged next nearest interactions on a Cayley tree of order two. We derive the recursion relations, which determine the free energy of a q-state Potts model on the Cayley tree. We exactly solve the phase transitions problem for the model, namely we calculate the critical surface such that there is a phase transition above it, and a single Gibbs state found elsewhere. We study the periodicity of the phases (Gibbs measures) by means of Lyapunov exponents.