The following two questions from a text book are written fairly similarly, but one answer uses parenthesis while the other answer does not. I used parentheses for both of my own answers, as that is how I interpreted them myself.
What are some of the written or unwritten indicators that can be used to tell whether parentheses are required for a proposition?
Let p, q, and r be the propositions
p : Grizzly bears have been seen in the area.
q : Hiking is safe on the trail.
r : Berries are ripe along the trail.
Question A: Grizzly bears have not been seen in the area and hiking on the trail is safe, but berries are ripe along the trail.
Answer A (mine): $(\lnot p \land q) \land r$
Answer A (textbook solution): $\lnot p \land q \land r$
Question B: If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not been seen in the area.
Answer B (mine): $r \rightarrow (q \iff \lnot p)$
Answer B (textbook solution): $r \rightarrow (q \iff \lnot p)$
You are correct in both your solutions.
In your first answer, the parentheses are perfectly appropriate. The text solution merely indicates that $$(\lnot p \land q) \land r \equiv \lnot p \land q \land r$$ because all the connectives are conjunctives ($\land$). That is, with all connectives conjunction, or with all connectives disjunction, we have associativity. (Your use of parentheses does not make your answer wrong. It is just as correct as the solution manual's answer.
So, e.g., $$(\lnot p \land q) \land r \equiv \lnot p \land (q \land r) = \lnot p \land q \land r$$
Your second answer is correct, as well, and here, your correct use of parentheses is crucial, because implication is not associative, and so the use of the comma, which you transcribed correctly, is crucial.
Don't ever hesitate to use the parentheses you use in the first example, or the second. Better to use parentheses, even if you don't need them, than to omit them, when they are crucial.