1) $\lnot (A \lor \lnot A)$ --- assumed [a]
2) $A$ --- assumed [b]
3) $A \lor \lnot A$ --- from 1) by $\lor$-intro
4) $\lnot A$ --- from the contradiction : 2) and 3) by $\lnot$-intro, discharging [b]
5) $A \lor \lnot A$ --- $\lor$-intro
6) $\lnot \lnot (A \lor \lnot A)$ --- from the contradiction : 1) and 5) by $\lnot$-intro, discharging [a]
7) $A \lor \lnot A$ --- from 6) by $\lnot \lnot$-elim.
For the different "flavours" of the negation rules in Natural Deduction you can see :
Your idea regarding the proof : $P \to Q \vdash \lnot P \lor Q$ is correct: you can use the "derived" rule :
$$\dfrac { } {\lnot P \lor P}$$
Alternatively :
0) $A \to B$ --- premise
1) $\lnot A$ --- assumed [a]
2) $\lnot A \lor B$ --- by $\lor$-intro
3) $\lnot (\lnot A \lor B)$ --- assumed [b]
4) $\lnot \lnot A$ --- from 1) with contradiction : 2) and 3) by $\lnot$-intro, discharging [a]
5) $A$ --- from 4) by $\lnot \lnot$-elim
6) $B$ --- from 0) and 5) by $\to$-elim
7) $\lnot A \lor B$ --- $\lor$-intro
8) $\lnot \lnot (\lnot A \lor B)$ --- from 3) with contradiction : 7) and 3) by $\lnot$-intro, discharging [b]
9) $\lnot A \lor B$ --- from 8) by $\lnot \lnot$-elim
Thus, from 0) and 9) :
$A \to B \vdash \lnot A \lor B$.
$$[(\color{blue}{p} \land \lnot q) \lor (\color{blue}{p} \land q)] \land q \equiv [\color{blue}{p} \land (\color{red}{{\lnot q \lor q}})] \land q\tag{distributivity}$$
$$ \equiv (\color{blue}{p} \land \color{red} \top) \land q$$
$$\equiv \color{blue}{p} \land q$$
That is, the distributive law declares that $$[p\land (\lnot q \lor q)] \equiv [(p \land \lnot q) \lor (p \land q)]$$ That means that it is the same law when we write it: $$[(p \land \lnot q) \lor (p \land q)] \equiv [p\land (\lnot q \lor q)]$$
Addendum
Best Answer
This is distributive law, check this list of Logical equivalences might be helpful $${\displaystyle (\color{blue}q\wedge\color{red}p)\vee (\color{green}r\wedge\color{red}p)}\equiv (\color{blue}q\vee \color{green}r)\wedge\color{red}p\tag*{distributive law}$$ Hence $(\color{blue}A∧\color{red}C)∨(\color{green}B∧\color{red}C)\equiv(\color{blue}A∨\color{green}B)∧\color{red}C$ hold.