Suppose that $v,w$ are linearly indepedent. All vectors
of $\mathbf R^n$ are to be treated as column vectors.
1) Perform Gram--Schmidt process on the set $\{v,w\}$ to obtain an orthonormal
basis $(v_1,v_2)$ for the linear span $L=\langle v,w\rangle$
such that
$$
v_1 = \frac 1{|v|}v.
$$
2) Perform Gram--Schmidt on the set $\{w,v\}$ to obtain an orthonormal
basis $(w_1,w_2)$ for $L$ such that
$$
w_1=\frac 1{|w|}w.
$$
3) Extend the linear independent set $\{v_1,v_2\}$ to a basis $\mathcal B$
of $\mathbf R^n,$ say by adding to it some of the unit vectors
$e_i$ from the standard basis for $\mathbf R^n.$ Perform Gram--Schmidt
on $\mathcal B,$ followed by normalizing of all vectors to obtain
an orthnormal basis
$$
(v_1,v_2,v_3,\ldots,v_n)
$$
for $\mathbf R^n.$
4) Consider an orthonormal basis
$$
(w_1,w_2,w_3,\ldots,w_n)=(w_1,w_2,v_3,\ldots,v_n)
$$
for $\mathbf R^n$ which is an extension of
the linear independent set $\{w_1,w_2\}.$
5) Form the $(n\times n)$ matrices $V,W$ whose columns
are the vectors $v_1,v_2,v_3,\ldots,v_n$ and $w_1,w_2,\ldots,w_n,$
respectively:
$$
V=(v_1 \, v_2 \, \ldots v_n)
$$
and
$$
W=(w_1 \, w_2 \, \ldots w_n).
$$
Now both matrices $V,W$ are orthogonal, since each of them takes
the standard (orthonormal) basis $(e_1,e_2,\ldots,e_n)$ to
an orthonormal basis. Say,
$$
V(e_1\, e_2 \, \ldots e_n)=(v_1 \, v_2 \, \ldots v_n)
$$
6) Finally, the matrix
$$
A=W V^{-1}
$$
takes the orthonormal basis $(v_1,v_2,\ldots,v_n)$
to the orthonormal basis $(w_1,w_2,\ldots,w_n),$ and hence orthogonal.
In particular,
$$
A v_1=w_1,
$$
whence
$$
Av=A |v| v_1=|v| w_1=\frac{|v|}{|w|}w,
$$
as required.