I understand how to solve this problem: i.e. take the unit vector of a, then multiply by our given magnitude (in this case $\sqrt{2}$) which gives: $\frac{\sqrt{2}}{5}}(3i+4j)$

I'm confused as to what the mathematical logic behind this, how would you explain why we're doing this process?

I'm confused as to what the mathematical logic behind this, how would you explain why we're doing this process?