Are both of these correct?
Teacher's solution
{↓} ⊢ (p → r) → r
{↓ , (p → r)} ⊢ r
1 ((p → ↓) → ↓) → p Ax3 F/p
2 ↓ → ((p → ↓) → ↓) Ax2 F/↓ G/(p → ↓)
3 ↓ ∈ Σ
4 ((p → ↓) → ↓) MP 2,3
5 p MP 1,4
6 p → r ∈ Σ
7 r MP 5,6
My solution
{↓} ⊢ (p → r) → r
{↓ , (p → r)} ⊢ r
1 ((r → ↓) → ↓) → r Ax3 F/r
2 ↓ → ((r → ↓) → ↓) Ax2 F/↓ G/(r → ↓)
3 ↓ ∈ Σ
4 ((r → ↓) → ↓) MP 2,3
5 r MP 1,4
Both derivations seem correct to me. It might seem strange to you that you didn't need to use $(p \to r)$ to arrive at the right answer, but when $\bot$ is a hypothesis, everything is easy to prove!
In fact, you've essentially discarded the $p \to r$ and proved the principle of explosion $\bot \to r$.