Sometimes the best way to proving that $A=B$ is to simply forget all about $B,$ and just have a lot of fun independently exploring the beauty of $A$ anew, with fresh eyes, for one's own intellectual pleasure, without having any needless worries concerning the much expected arrival at point $B$ menacingly hovering over one's mind, as a dark cloud, of sorts. This is basically the mathematical equivalent of the well-worn philosophical adage about a true traveler not knowing his destination.
Now, any road, no matter how long, begins with a simple step. So, what if I were to simply tell you that $$(x+a)^2=x^2+2ax+a^2~?$$ You'd probably say that, apart from being painfully obvious, it is also of no practical use to us, since we are dealing with a fourth degree $($or quartic$)$ expression, rather than a humble quadratic. But what if we'd replace $x$ by $x^2$ ? Then the polynomial expression would soon become $$(x^2+a)^2=x^4+2ax^2+a^2,$$ bringing it much closer to our intended form for $A(x)$. Just two “small” problems: $39$ is odd, and $50$ is not a perfect square. So let's put this on pause for a second, and take a look at the remaining two terms, $10x^3+70x:$ is there nothing that can be done here ? “Well, sure there is!”, you might retort. “Both share a common factor, $10x.$” So let's see where that takes us, shall we ? $$10x^3+70x=10x~(x^2+7).$$ But, wait a second here, doesn't the latter expression, $x^2+7,$ look suspiciously similar to our initial one, $x^2+a$ ? In which case, $a^2=7^2=49,$ which comes incredibly close to our original $50=49+1,$ and $2a=2\cdot7=14,$ whose difference until $39$ is $39-14=25=5^2,$ which $($remaining$)$ coefficient fits ever so nicely with the $x^2$ it multiplies. Wrapping it all up, the polynomial becomes $$A(x)=(x^2+7)^2+2\cdot5x~(x^2+7)+(5x)^2+1,$$ at which point the factoring $A(x)=\Big[(x^2+7)+5x\Big]^2+1$ should become rather transparent.
Further writing $1=-i^2,$ and using $a^2-b^2=(a-b)(a+b),$ we eventually obtain $$A(x)=(x^2+5x+7-i)~(x^2+5x+7+i).$$ Since $(7-i)~(7+i)=7^2-i^2=49+1=50,$ we are most likely looking for something like $$A(x)=\Big[x^2+(5-n)~x+p\Big]\cdot\Big[x^2+(5+n)~x+q\Big],$$ with $pq=50$. $($Would you like me to finish this for you, or do you, by any chance, already feel confident enough to take it from here $?).$