Whitehead product $[i_2, i_2]_W$
You start abstractly with the James Construction $J(X)$ on a given space $X$ with basepoint $*$, which is the free associative topological monoid on the points of $X$, with $\ast$ acting as the identity element. That is, an element of $J(X)$ is described by an ordered $n$-tuple $(x_1,\dots,x_n)$ of points $x_i\in X$ under the identifications that $(x_1,\dots, x_{i-1},\ast, x_{i+1},\dots, x_n)\sim (x_1,\dots, x_{i-1},x_{i+1},\dots x_n)$. There is an obvious product on $J(X)$ given by concatenation which makes it into a strictly associative topological monoid. Furthermore, there is an obvious embedding $\iota:X\rightarrow J(X)$.
Now $J(X)$ has several nice properties. Firstly it has a certain universal property: If $Z$ is a homotopy-abelian $H$-space and $f:X\rightarrow Z$ is a map, then there is a homotopically unique $H$-map $\tilde f:J(X)\rightarrow Z$ which satisfies $\tilde f\circ\iota\simeq f$.
A consequence of this is that the suspension map $\sigma:X\rightarrow\Omega\Sigma X$ induces an $H$-map $\tilde\sigma:J(X)\rightarrow \Omega\Sigma X$, and it is a theorem of James that this map is a weak homotopy equivalence. In fact this follows from applying the Bott-Samelson theorem which states that there is an algebra isomorphism $H_*\Omega\Sigma X\cong T_*(\tilde H X)$ of the Pontrjagin ring of $\Omega\Sigma X$ with the free tensor alebra on $\tilde HX$. Note that the suspension map $\sigma$ is the adjoint of $id_{\Sigma X}$, and is given by $\sigma(x)(t)=[x,t]$.
Now the last property of $J(x)$ that we will need is that it has an obvious filtration: for each $n\in\mathbb{N}$ there is a map $X\times\dots\times X\rightarrow J(X)$, taking an ordered n-tuple to its equivalence class, and $J_n(X)\subseteq J(X)$ is defined as the image of this map. In particular it contains all products of points of length $\leq n$. One shows inductively that each $J_{n+1}(X)$ is obtained as the pushout of the pair of (mainly) obvious maps
$$J_n(X)\leftarrow (X\times J_{n-1}(X))\cup(\ast\times J_n(X))\rightarrow X\times J_n(X).$$
Clearly $J_1(X)\cong X$ is the image of $\iota(X)$, and this means that $J_2(X)$ is obtained as the pushout
$$X\xleftarrow{\nabla} X\vee X\hookrightarrow X\times X.$$
Now assume that $X\simeq \Sigma Y$ is a suspension. Then the right-hand arrow of the above pushout is a principal cofibration, induced by the generalised Whitehead product $w_{\Sigma Y}:\Sigma Y\wedge Y\rightarrow \Sigma Y\vee \Sigma Y$, and this means that the pushout space sits in a cofiber sequence
$$\Sigma Y\wedge Y\xrightarrow{[id_{\Sigma Y},id_{\Sigma Y}]} \Sigma Y\rightarrow J_2(\Sigma Y)$$
where $[id_{\Sigma Y},id_{\Sigma Y}]=\nabla\circ w_{\Sigma Y}$.
Now, to the point. Take $X=S^2$, so that $Y=S^1$. Then $[id_{S^2},id_{S^2}]\in\pi_3S^2$, and this group is rank 1 free abelian generated by the Hopf map $\eta$. Hence $[1_{S^2},1_{S^2}]=a\cdot\eta$ for some $a\in\mathbb{Z}$ and we have the cofiber sequence
$$S^3\xrightarrow{[id_{S^2},id_{S^2}]}S^2\rightarrow J_2(S^2)\simeq S^2\cup_{a\cdot\eta}e^4$$
It follows from this that $H^*J_2(S^2)$ is $\mathbb{Z}$ in degrees $2$ and $4$ and zero elsewhere and that if $x\in H^2J_2(S^2)$ and $y\in H^4J_2(S^2)$ are generators, then we will be able to determine the integer $a$ by the equation
$$x^2=a\cdot y.$$
Now note that the map
$$J_2(S^2)\hookrightarrow J(S^2)\simeq \Omega\Sigma S^2\sigma\Omega S^3$$
is $5$-connected. This follows by observing as above that $J_{n+1}(S^2)$ is obtained from $J_{n}S^2$ by attaching a single $2(n+1)$-cell. Thus
$$H^*J_2S^2\cong H^*\Omega S^3$$
for $*\leq 4$, so if we can calculate $H^*\Omega S^3$ then we done. But this is not too difficult for anyone who knows of the Serre spectral sequence. We have a homotopy fibration
$$\Omega S^3\rightarrow \ast\rightarrow S^3$$
and therefore a cohomology spectral sequence with $E_2\cong \Lambda(x_3)\otimes H^*\Omega S^3$ and converging to $\mathbb{Z}$ in degree $0$. Thus one obtains $H^*\Omega S^3$. I suggest doing the calculation yourself, but the answer is that $H^*\Omega S^3\cong \Gamma(x)$ is a divided power algebra on a degree $2$ class $x$.
As a module this has a free factor in each even degree $2n$, generated by a class $\gamma_n(x)$ (with $\gamma_1(x)=x$), and the algebra rules are $\gamma_m(x)\cdot \gamma_n(x)={m+n\choose n} \gamma_{n+m}(x)$.
In particular then we have $x^2=2\cdot \gamma_2(x)$. With our previous notation this is the equation in $H^4J_2(S^2)$
$$x^2=2\cdot y$$
and as we noted above this allows us to conclude that the interger $a=2$, and more relevantly that
$$[id_{S^2},id_{S^2}]=2\cdot\eta.$$
The Hopf fibration $S^1\to S^3\to S^2$ gives the long exact sequence in homotopy groups. Since higher homotopy groups of $S^1$ are trivial, we get $\pi_3(S^3)\cong\pi_3(S^2)$, with the generator given by the Hopf map. We can define the inverse isomorphism $H:\pi_3(S^2)\to \mathbb{Z}$ called the Hopf invariant as follows.
Let $x_1,x_2\in S^2$ be two distinct points and assume we pick a reprensetative of a class $\alpha\in\pi_3(S^2)$ which is a smooth map $f:S^3\to S^2$ with regular values $x_1$ and $x_2$. We can then consider $L_i:=f^{-1}(x_i)$ for $i=1,2$ which is an oriented submanifold of dimension $1$ in $S^3$, i.e. an oriented link. Define:
$$ H(\alpha):=lk(L_1,L_2)$$
the linking number of two oriented links, which is defined as the sum of pairwise linking numbers of each components of $L_1$ with each component of $L_2$.
One then checks that this is a well-defined invariant of $\alpha$.
Since both maps are very explicit, one can calculate that:
$$H(\eta)=1$$ $$H([\iota_1,\iota_2]_W)=2$$
In the Hopf fibration $L_1$ and $L_2$ are two circle fibres and it is an exercise to prove that they form a Hopf link, so their linking number is $1$.
For the Whitehead product use that it is given as the composition $S^3\to S^2\vee S^2\to S^2$ of the universal Whitehead product (the attaching map of the top cell in $S^2\times S^2$) and the fold map. Both $L_1$ and $L_2$ are $2$-component links (together this forms a $0$-framed push-off of the Hopf link!) and out of four linking numbers, precisely two are $1$. To see this you might want to use that linking numbers can be computed from surfaces (here disks) that links bound in $D^4$ (see Rolfsen, for example).