A question based on proving a result in congruences ($\equiv$) This question is to be used in a separate question in number theory and I am having trouble in proving it. So, I'm asking for help here.

Given integers $n$, $k_1$, $k_2$ such that $(k_1, k_2) =1$, then show that there exist integers $n_1$, $n_2$ such that $n \equiv n_1 k_2^2 + n_2 k_{1}^2 \pmod{k_{1}k_{2}}$.

Attempt : $(k_1, k_2) = 1 $  implies $({k_1}^2 , {k_2}^2)= 1 $ and so there exist $x$, $y$ such that $ x k_{1}^2 +yk_{2}^2 =1$. Multiplying by $n$ both sides and  then substituting $nx = n_1$ and $n y =n_2$, I got what's required but it's not modulo $k_1k_2$.
I have no idea on how to make it into modulo $k_1 k_2$ or if there is a different approach.
Can you please tell me how to approach this?
 A: Hint: square $1=xk_1+yk_2$ and only after this multiply by $n$.
A: "I got required but it's not in modk1k2 "
Isn't it?   $1\equiv 1 \pmod{k_1k_2}$ and $n\equiv n\pmod{k_1k_2}$
so if $xk_1^2 + yk_2^2 = 1\equiv 1\pmod{k_1k_2}$ then $nxk_1^2 + nyk_2^2 = n\equiv n \pmod {k_1k_2}$
Seems like you found a way to avoid the entire issue by noting $(k_1,k_2)=1 \iff (k_1^2,k_2^2) = 1$.
I think the intended answer (without that observation) was supposed to be:
$\gcd(k_1,k_2)=1$ implies there exist $x,y$ so that  $xk_1 + yk_2 =1$.  So $n(xk_1+yk_2)^2=n$ and $n= nx^2k_1^2 + 2nxyk_1k_2 + ny^2k_2 \equiv nx^2k_1^2 + ny^2k_2 \pmod{k_1k_2}$.
=======
I think somehow by your comments "in $\pmod{k_1k_2}$" and "into $\pmod{k_1k_2}$", you are assuming they are asking you find integers where $n_1k_1^2 + n_2k_2^2 \equiv n \pmod{k_1k_2}$ AND that $n_1k_1^2 + n_2k_2^2$ is the representation of $n$ so that $0\le n_1k_1^2 + n_2k_2^2 < k_1k_2$.
That is not actually part of the question and doesn't need to be considered. But even if we wanted that we can easily do that by considering $n \equiv n' \pmod{k_1k_2}$ where $n'$ is the representation of $n$ so that $0 \le n' < k_1k_2$.  Then $n_1 = n'x$ and $n_2 =n'y$ and we have $n_1k_1^2 + n_2k_2^2=n'\equiv n\pmod {k_1k_2}$.
