In order to:
prove something without premises
we have to take care to discharge all the "temporary" assumptions we made in the derivation.
We can prove your formula using LEM, that in turn is derivable from Double Negation.
1) $A$ --- assumed [a]
2) $A \lor \lnot A$ --- from 1) by $\lor$-intro
3) $\lnot (A \lor \lnot A)$ --- assumed [b]
4) $\bot$ --- $\bot$-intro: from 2) and 3)
5) $\lnot A$ --- by $\lnot$-intro from 1) and 5), discharging [a]
6) $A \lor \lnot A$ --- from 5) by $\lor$-intro
7) $\bot$ --- $\bot$-intro: from 3) and 6)
8) $A \lor \lnot A$ --- from 3) and 7) by DN, discharging [b]
Note: up to now we have proved $\vdash A \lor \lnot A$; this is an example of how to derive a valid formula, i.e. how to prove something without assumptions.
9) $A$ --- assumed [c] from 8) by $\lor$-elim
10) $A \lor (A \to B)$ --- from 9) by $\lor$-intro
11) $\lnot A$ --- assumed [d] from 8) by $\lor$-elim
12) $A$ --- assumed [e]
13) $\bot$ --- $\bot$-intro: from 11) and 12)
14) $B$ --- $\bot$-elim: from 13)
15) $A \to B$ --- from 12) and 14), discharging [e]
16) $A \lor (A \to B)$ --- from 15) by $\lor$-intro
17) $A \lor (A \to B)$ --- from 9)-10) and 11)-16) and 8) by $\lor$-elim, discharging [c] and [d].