Did I solve a basic derivation problem correctly? The following problem is from Mathematical Logic by Ian Chiswell and Wilfrid Hodges, 2007.

 A: The solution offered by the OP, $\{\psi,\phi\} \vdash (\phi\to(\psi\to\phi))$, could be the sequent the authors expect as a solution to Exercise 2.4.3 (b). 
There is no question about the conclusion of the sequent. It is the bottom line of the derivation. The question concerns what statements are in the set of undischarged assumptions. 
That set could contain some of the following statements: $\phi$, $\psi$, or even $(\psi\to\phi)$. That it does not contain $(\psi\to\phi)$ can be seen by the use of the Sequent Rule $(\to I)$ in the derivation. That statement is derived. Since no statements are discharged in the derivation, the set of statements that are undischarged are $\{\psi,\phi\}$.
Hence the desired solution to the exercise could be the sequent $\{\psi,\phi\} \vdash (\phi\to(\psi\to\phi))$.

Chiswell, I., & Hodges, W. (2007). Mathematical logic. OUP Oxford.
A: Not exactly...
I think that, due to the fact that the assumption $\varphi$ has not been "crossed away", it is correct to consider it undischarged.
But $\psi$ is not listed explicitly as an assumption; thus, I think that the correct answer is :

$\{ \varphi \} \vdash (\varphi \to (\psi \to \varphi))$.

The following :

$$\dfrac{ \varphi }{ \psi \to \varphi }$$

is a correct application of the rule ($\to$-I); "semantically", if $\varphi$ is true, then $\psi \to \varphi$ is true, for $\psi$ whatever.
