To contemplate something means to think about it.
Mark took a moment to contemplate the math problem before solving it.
Example picture