In your second derivation, there is no need for an assumption R to derive P ∨ R from P. Also, you don't cancel R in the ->I rule because the premise of the newly formed implication is P ∧ Q. You are only allowed to cancel the premise.

Formally, there are only two requirements: each node in the derivation must conform to one of the inference rules and all open assumptions must be eventually closed (or some may be kept open if the problem statement stipulates so). This does not say how to build a derivation, though.

If you don't use the rule of double-negation elimination, then each branch in the shortest derivation starts with eliminations and ends with introductions (all inference rules are divided into introduction and elimination rules). Note that this is the structure of the two derivations in your post. From this, one can prove the so-called subformula property: in the shortest derivation each formula is a subformula of either an open assumption or the conclusion. So when you need to construct a derivation, break the formula apart by going bottom-up and using introduction rules: to prove an implication, assume the premise, to prove a conjunction, prove both conjuncts and so on. When you arrive at atomic formulas, use open assumption you introduced to derive them.

It may also help to think about formulas as functions or factories that take premises and produce conclusions. Under this view, conjunctions correspond to pairs (elements of Cartesian product) and disjunctions to elements of disjoint unions. In your third formula, suppose you are given two functions that turn P and R into Q. Then if you have a pair of P and R, it is clear how to produce a Q: just take any element of that pair and apply the corresponding function. It is even enough to have not a pair of P and R, but either P or R.

Hope this helps, and feel free to ask further questions.