Be a cheerleader. If she can achieve her goal with effort, encourage her. When she's playing with toy pegs that are puzzling (literally), demonstrate your own "failures" and strategies. ("Oh, I can't make this fit! Let me try over here.")
Give a hand. She reaches out to pick up a large ball, but only succeeds in pushing it away. In a situation like this, offer some guidance. Crouch behind her and show her how to pick the ball up with both hands. ("You can do it! Let's try it together, and then you can do it yourself.")
Move on. If it's obvious (to you, at least) that she won't be able to perform the task at hand, refocus her attention. If she's trying to build a tower to no avail, blame the "silly" blocks and give her a hug for trying so hard.