Solution 1:

In L. E. Dickson, History of the Theory of Numbers, Volume II, page 167

T. Fantet de Lagny$^{18}$ replaced $m$ by $d+n$ in $(1)$ and obtained $$ x = 2n(d+n),\;\; y=d(d+2n),\;\; z = x+d^2=y+2n^2. $$

The footnote 18 is briefly "Hist. Acad. Sc. Paris, 1729, 318."

Your formulas are

$$A\!=\!(2n\!-\!1)^2\!+\!2(2n\!-\!1)k,\\ B\!=\!2(2n\!-\!1)k\!+\!2k^2,\\ C\!=\!(2n\!-\!1)^2\!+\!2(2n\!-\!1)k\!+\!2k^2.$$

Get this from Lagny's formulas if $\,d\,$ is replaced by $\,2n-1\,$ and $\,n\,$ is replaced with $\,k.\,$

Thus, your formula is equivalent to de Lagny's except $\,2n-1=d\,$ is always odd, however, if $\,d\,$ is even, the triple has a common factor of $2$ and can not be primitive.

Solution 2:

This paper defines the 'height' of a triple as $C-B$ and classifies Pythagorean triples in terms of their height and a parameter $k$.

Height and excess of Pythagorean triples, D McCullough - Mathematics Magazine, 2005 - Taylor & Francis, https://doi.org/10.1080/0025570X.2005.11953298