While the marshmallow is in the tube, your blowing increases the air pressure in the tube, creating a force on the marshmallow. As long as this force is greater than the friction force, there's an unbalanced force on the marshmallow. According to Newton's second law, F = ma, an unbalanced force accelerates an object. The speed of the marshmallow will keep increasing for as long as the marshmallow experiences an unbalanced force.
As soon as the marshmallow leaves the tube, your blowing no longer affects it. But the faster the marshmallow is traveling when it leaves the end of the tube, the farther it will travel before hitting the ground.
When the marshmallow is at the far end of the tube away from your mouth, it falls out of the tube almost as soon as you blow on it. The unbalanced force on it doesn't last very long, so the marshmallow doesn't accelerate very fast or travel very far.
When the marshmallow is at the end of the tube that's closest to your mouth, it experiences an unbalanced force for the entire length of the tube as you blow on it. Since the force acts for a longer time, the marshmallow is going faster when it leaves the tube, and it therefore travels farther.
The tube length that will provide maximum speed is determined by how long you can keep blowing strongly enough to maintain enough pressure in the tube so that the force produced on the marshmallow is larger than the friction force. If you have really powerful lungs, you can use a very long tube—and get a very fast-moving marshmallow!