<s>[INST] Can $a^2+b^2+2ac$ be a perfect square if $c\neq \pm b$? 
Can $a^2+b^2+2ac$ be a perfect square if $c\neq \pm b$?  

$a,b,c \in \mathbb{Z}$.
I have tried some manipulations but still came up with nothing. Please help. 
Actual context of the question is:
Let say I have an quadratic equation $x^2+2xf(y)+25$ that I have to make a perfect square somehow. So can I conclude that $f(y)=\pm5$
$($i.e $x^2+2xf(y)+25$ is perfect square only if $f(y)=\pm5)$, or are there other possibilities for $f(y)$?
Note:$x$ and $y$ are not related in any other way.
 [/INST] A small manipulation changes the problem into a more familiar one.  We are interested in the Diophantine equation $a^2+b^2+2ac=y^2$. Complete the square. So our equation is equivalent to $(a+c)^2+b^2-c^2=y^2$. Write $x$ for $a+c$. Our equation becomes 
$$x^2+b^2=y^2+c^2.\tag{$1$}$$
In order to get rid of trivial solutions, let us assume that we are looking for solutions of the original equation in positive integers. Then $x=a+c\gt c$. The condition $b\ne c$ means that we are in essence trying to express integers as a sum of two squares in two different ways.
The smallest positive integer that is a sum of two distinct positive squares in two different ways is $65$, which is $8^2+1^2$ and also $7^2+4^2$.  So we can take $x=a+c=8$, $b=1$, and $c=7$, giving the solution $a=1$, $b=1$, $c=7$. Or else we can take $c=4$, giving the solution $a=3$, $b=1$, $c=4$. Or else we can take $x=a+c=7$. 
The next integer which is the sum of two distinct positive squares in two different ways is $85$. We can use the decompositions $85=9^2+2^2=7^2+6^2$ to produce solutions of our original equation. 
General Theory: Suppose that  we can express $m$ and $n$ as a sum of two squares,  say $m=s^2+t^2$ and $n=u^2+v^2$. Then
$$mn=(su\pm tv)^2+(sv\mp tu)^2.\tag{$2$}$$ 
Identity $(2)$ is a very important one, sometimes called the Brahmagupta Identity. It is connected, among other things, with the multiplication of complex numbers, and the sum identities for sine and cosine. 
Identity $(2)$ can be used to produce infinitely many non-trivial solutions of Equation $(1)$, and therefore infinitely many solutions of our original equation. For example, any prime of the form $4k+1$ can be represented as a sum of two squares. By starting from two distinct primes $m$ and $n$ of this form, we can use Identity $(2)$ to get two essentially different representations of $mn$ as a sum of two squares, and hence solutions of our original equation.  
</s>