Let $k,a,b,c,$ and $d$ be integers, and let $m \ge 2$ be a non-square integer, such that $$ k(a^2+mb^2) = c^2+md^2. $$
QUESTIONS:
What can be said about the form of $k$ with no further restrictions?
What can be said about the form of $k$ when $m$ has further restrictions (e.g., $m$ is a prime $p$ of a given form)?
In particular: Under what conditions is it guaranteed that $k=u^2+mv^2$ for some integers $u$ and $v$?