The answer to the MATH problem is 19. The progression has to many mistakes and missing terms to be solved as a complete math problem.

The LOGIC problem can be solved as 40 or 96, ignoring the obvious math mistakes.