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?