Let's start with the second question. Yes, the expression "for five hours" is the typical expression for designating the amount of time during which something was happening. "for" doesn't really group together with "up to".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.