If I had to put it simply, I would say the main factors are:
Lack of Consistency in Constructing the Solving Process:The more adequatly the solving process had been constructed in regard to the type of problem it's supposed to resolve/answer to, and (/or) consolidated on a neural level (and that's all the more true the more attempts and/or distractions have been involved in the process), the easier and faster it will be for a person to solve it. Consistency is a significant factor in determining proficiency and expertise. When the formula or method is less specific (though not necessarily less precise), there is less variation in processing time. For example, using the same mathematical methods to calculate both 10×10 and 19×16 rather than employing different techniques like simply adding a '0' when multiplying by 10 would, once familiar with the process, result in a more consistent problem-solving time than relying on simpler patterns and recognition.
Noise During the Learning Process:Multiple attempts without a clear solving process can create neural connections that introduce slight divergences, leading to other thoughts or alternative process attempts. This can result in slower problem-solving or even an inability to resolve the problem.
Context and Current Mental State During Problem-Solving:Without a solid and efficient neural network developed to solve a specific kind of problem, distractions whether external or internal can more easily divert one from an optimized solving process. This increases the possibility of not being able to find an answer at all if either the distractions are too misleading or the solving process is insufficiently consolidated.
(this is a very short and simplified answer, but hope it'll help you get my my modest perspective on the question)