When a student asks for help, I want to know where the work stopped. Two people staring at the same blank box may need quite different things. One has forgotten what the problem asked. The other knows exactly what to do and cannot find the next letter.
Wood, Bruner and Ross studied how a tutor helped young children assemble a structure. Among the jobs they described were drawing attention to an important feature and managing frustration. A useful hint leaves the learner with a real move to make.
At the keyboard I would try this order. Give the idea first. If that fails, give the first letter. Then show one word. Let the student finish and immediately try a fresh line without the help. A hint has done its job when you can put it away.
Eric Garthoffner