edit: I originally made this post to check my understanding of this proof. Now I understand this is not a good type of question to ask. Despite regretting making this post originally, I would rather fix this proof than delete it if that's ok.
My attempt at a proof of the following statement: odd factors of $a^2+3b^2$ have this same form, when $\gcd(a,b)=1$.
(i) First let us establish that the set $a^2+3b^2$ is closed under multiplication.
$\hspace{2.5cm}$$(a^2+3b^2)(c^2+3d^2)$
$\hspace{2cm}$$=(ac)^2+3(ad)^2+3(bc)^2+9(bd)^2$
$\hspace{2cm}$$=(ac)^2\pm 6abcd+9(bd)^2+3(ad)^2\mp 6abcd+3(bc)^2$
$\hspace{2cm}$$=(ac\pm 3bd)^2+3(ad\mp bc)^2=e^2+3f^2$
(ii) We also need to establish the following:
If $N=a^2+3b^2$ and $p=c^2+3d^2$, $p$ is prime and $p$ divides $N$, then $\frac{N}{p}=u^2+3v^2$ ($N,p\in Z$)
Since $p$ divides $N$, it must divide $Nd^2-pb^2$ and:
$\hspace{2cm}$$Nd^2-pb^2=(a^2+3b^2)d^2-(c^2+3d^2)b^2$
$\hspace{4.5cm}$ $=a^2d^2+3b^2d^2-c^2b^2-3b^2d^2$
$\hspace{4.5cm}$ $=(ad+cb)(ad-cb)$
Therefore $p$ divides either $ad+cb$ or $ad-cb$. Being a prime number, it cannot equal the product. Also if $p=1$ then the case is already proved as $\frac{N}{1}=N$. Now consider the expression $Np$:
$\hspace{2cm}$ $Np = (ac\pm3bd)^2+3(ad\mp bc)^2$ [using the identity from (i)]
Given that $p$ divides one of $(ad\mp bc)$, it must also divide $(ac\pm3bd)$, in other words it must divide both terms of $Np$.
Now we can divide $Np$ by $p^2$ so we have:
$\hspace{2cm}$ $\frac{Np}{p^2}=\frac{(ac\pm3bd)^2}{p^2}+\frac{3(ad\mp bc)^2}{p^2}$
$\hspace{2cm}$ $\frac{N}{p}=\left(\frac{ac\pm3bd}{p}\right)^2+3\left(\frac{ad\mp bc}{p}\right)^2$
This tells us (given the above conditions):
$Np=e^2+3f^2 \implies p$ divides both $e$ and $f$ to give $\frac{N}{p}=g^2+3h^2$
Another way to state this is that if $xp=a^2+3b^2$ then $\frac{xp}{p}=c^2+3d^2$.
Theorem: Odd factors of $a^2+3b^2$ have this same form, when $\gcd(a,b)=1$
It is enough to prove the statement for odd primes, due to (i).
Assume that we have an integer in the form $a^2+3b^2$ that has some prime factor $p$, where $p>2$, that cannot be written in this same form.
$\therefore pq=a^2+3b^2$, where $q$ is an integer and $q>1$ (otherwise $p=a^2+3b^2$). $q$ can be odd or even. These will be considered as separate cases.
Case 1: q is even.
If $q$ is even, $a^2+3b^2$ is even, so $a$ and $b$ are either both even or both odd. As we are assuming the minimal case, we can assume $a$ and $b$ are both odd.
let $a=x+y$ and $b=x-y$ where $x$ is even, $y$ is odd. $\hspace{1cm}$($a=x-y$ and $b=x+y$ also works)
$\therefore pq=(x+y)^2+3(x-y)^2=x^2+2xy+y^2+3x^2-6xy+3y^2=4x^2-4xy+4y^2=4(x^2-xy+y^2)$
Using the fact that $x^2-xy+y^2=\left(\frac{(x-2y)}{2}\right)^2+3\left(\frac{x}{2}\right)^2$ and that $x$ is even, we can say that $pq=4(c^2+3d^2)$, where $c$ and $d$ are integers and $c^2+3d^2$ is odd.
So we can produce a smaller odd factor $z$ such that $pz=c^2+3d^2$, and we only need to consider the case where $q$ is odd.
Case 2: q is odd
As $q$ is odd, $a^2+3b^2$ is odd.
Let $a=xp+r$ and $b=yp+s$ where $|r|,|s|<\frac{p}{2}$
($r$ and $s$ being some remainder after dividing $a$ and $b$ by $p$)
$\therefore pq = (xp+r)^2+3(yp+s)^2$
$\hspace{0.9cm}$$= p(x^2p+2xr+3y^2p+6ys)+r^2+3s^2$
$\therefore p\mid r^2+3s^2$ where $r^2+3s^2$ is less than $p^2$, due to the following:
As $r,s<\frac{p}{2}\implies r^2+3s^2<\left(\frac{p}{2}\right)^2+3\left(\frac{p}{2}\right)^2$
$\hspace{4.9cm}$$<\frac{p^2}{4}+\frac{3p^2}{4}$
$\hspace{4.9cm}$$<\frac{4p^2}{4} $
$\hspace{4.9cm}$$< p^2$
Hence, we have $pn=r^2+3s^2$, where $n$ is an integer, $n< p$, and $n$ can be either odd or even. However, due to case 1, we can assume $n$ is odd (or produce a smaller odd factor), and as $n$ is odd, we can repeat the above process for $n$, to produce a smaller odd factor, and so on until we produce a prime $i$ such that $i=k^2+3l^2$ (otherwise we have a contradiction by infinite descent).
We can conclude then that due to (ii) and this process of descent, $n, p$ can be shown to have the form $a^2 +3b^2$.
For example, suppose we had shown that $ni=y^2+3z^2$ and so $n=w^2+3v^2$ due to (ii). Then either $n$ is prime or has odd prime factors $n_1,n_2...$ which we would be able to show have the same form. Then $n$ must be of the same form, and therefore also $p$.
This produces a contradiction as we assumed $p$ was not of the form $a^2+3b^2$.
Therefore all odd factors of $a^2+3b^2$ have this same form.
References:
13 lectures on Fermat's Last Theorem, by Ribenboim.
Primes of the form $x^2+ny^2$ by Cox
http://fermatslasttheorem.blogspot.com/2005/05/fermats-last-theorem-n-3-a2-3b2.html
I think that your argument has an error.
You have written
Then, you have written
You are saying in the comments that the above argument proves the following claim :
Claim A : If $q$ is of the form $n^2+3m^2$, then $\dfrac{a^2+3b^2}{q}$ is of the form $n^2+3m^2$.
I think that you have not proven Claim A.
So, I think that you are claiming, without any proof, that $q$ cannot be of the form $a^2+3b^2$.
To see why your argument does not prove Claim A, let us consider the following claim :
Claim B : If $q$ is of the form $n^2+\color{red}7m^2$, then $\dfrac{a^2+\color{red}7b^2}{q}$ is of the form $n^2+\color{red}7m^2$.
The claim B is false. A counterexample is $\dfrac{3^2+7\times 7^2}{1^2+7\times 5^2}=2$ where $2$ is not of the form $n^2+7m^2$.
However, using your argument, I can "prove" that Claim B is true as follows :
This shows that your argument does not prove Claim A.
If you want to use that "$q$ is not of the form $n^2+3m^2$", then, for example, you need to prove the following claim :
Claim C : If $a$ is of the form $n^2+3m^2$, and $b$ is not of the form $n^2+3m^2$, then $ab$ is not of the form $n^2+3m^2$.
If you can prove that Claim C is true, then you can say that $q$ cannot be of the form $n^2+3m^2$.