How do I show that two sets are equal. This is an ever so slightly modified version of a question from my book. My teacher went over this with me, but I would like an explanation that I can keep coming back to until I have this method figured out precisely.
$A = \{1, 2, 3, 4\}$
$B = \{ n | n \in \mathbb{Z}^+, n^2 < 17 \}$ where $\mathbb{Z}^+$ is the positive integers.
Show that $A = B$

I understand that to do this I must show for every $n$:
$n \in B \rightarrow n \in A$
and
$n \in A \rightarrow n \in B$

How to do that is still something I am not entirely sure how to do correctly, so I will give it my best and someone can show me errors or how to complete it.

If, $n \in B$ then $n^2 < 17$
$n < \sqrt{25}$, therefore $n < 5$
Since $n$ is a positive integer, $0 < n$
therefore, for every $n \in B, 0 < n < 5$, therefore $n \in A$
For every element $n$ such that $n \in A$, $n$ is one of 1, 2, 3, or 4
(I am probably taking too long to do this, but I am unsure how thorough it needs to be, so I will stop here to not waste time. What I would like to know is how can I write this quicker but still make valid statements and show that A = B more easily? I am also making statements that seem unnecessary or unconventional and perhaps even invalid from a logical perspective. I appreciate any help you can offer, the more the merrier!)

To finish the proof with help from amWhy:
$4$ is the largest element of $A$, and $4 < \sqrt{17}$
Assuming $n \in A$, $0 < n \leq 4$, $n^2 \leq 16 < 17$, therefore, $\forall n(n \in A \rightarrow n \in B)$
Therefore $A = B$, hurray!
 A: Your proof strategy is fine:
To show that sets $A = B$, one usually wants to show that $A\subseteq B \text{ and}\; B \subseteq A$, which means, equivalently $$ (n \in A \rightarrow n \in B \;\text{ and}\;\; n \in A \rightarrow n \in B)$$
First part:

If, $n \in B$ then $n^2 < 17$, and $n < \sqrt{25}$, therefore $n < 5$

Replace this last statement above with:
$n^2 \lt 17$ which implies $n \lt \sqrt{17}$, therefore, $n \leq 4$.

Since $n$ is a positive integer, $0 < n,\;$ therefore, for every $\;n \in B, 0 < n < 5$.
For every element $n$ such that $n \in A$, $n$ is [one] of $1, 2, 3, \,\text{or}\; 4$


Can you proceed with the other direction? $n \in A \rightarrow n \in B\;$?
So for (II), We assume $n \in A$, $n\in \{1, 2, 3, 4\}$ and show that it follows that $n \in B$. It suffices to check that the largest element $n \in A$, $n = 4$,  is such that $4^2 \lt 17$, then the square of the rest of the values in A must also be less than $17$, since $\forall n \in A, n^2 \leq 4^2 = 16 \lt 17.$ Hence, $\forall n \in A, n \in B$.
Part I and Part II show that $A = B$
