Below is a solved example on how a function's derivative can be found using linear transformations. However, I do not understand this example and I would much appreciate if someone can give me a explanation. Especially how you go from step 2 to step 3. Thank you!

Finding derivative of a multivariable function using linear transformations
1 Answers
Recall that $\pi^1: (x,y) \mapsto x$ and $\pi^2: (x,y) \mapsto y$. So we have $$f(x,y) = \sin(\pi^1(x,y) (\pi^2(x,y))^2) = [\sin\circ (\pi^1 \cdot (\pi^2)^2)](x,y)$$
Which we can also express as $f = \sin \circ B \circ (\pi^1,B\circ (\pi^2,\pi^2))$, where $B$ is the bilinear map $(x,y) \mapsto xy$.
Recall the chain rule: $D(f\circ g)(X) = Df(g(X)) \circ Dg(X)$, or $Df(g(X)) \cdot Dg(X)$ (whichever applies), and that the derivative of a bilinear map $B$ is given by: $DB(a,b)(s,t) = B(a,t) + B(s,b)$.
Thus, $Df(x,y)(h,k)$ is:
$$D\sin (xy^2) DB(x,y^2) [D\pi^1(x,y)(h,k), DB(\pi^2(x,y), \pi^2(x,y))(D\pi^2(x,y)(h,k), D\pi^2(x,y)(h,k))] \\=\cos(xy^2) DB(x,y^2)[h,DB(y,y)(k,k)] = \cos(xy^2) DB(x,y^2)(h,2ky) \\ = \cos(xy^2) (2kxy + hy^2) = \cos(xy^2)(y^2, 2xy)\cdot (h,k)$$
Thus, $Df(x,y) = \cos(xy^2)(y^2, 2xy)$.
I hope this is more helpful than confusing.