Is this a statement (logic)? $\frac{x^2-25}{x-5}=x+5$ represents a statement, which can be true or false (if $x\neq5$). 
But if $x=5$ is it still a statement? E.g. Is "undefined expression equals 10" a statement? And why? 
 A: There seem to be two different issues being run together here.
First there is a general issue about the use of variables $x$, and when their occurrence in an expression does and doesn't result in a complete statement.
(i) Usually something like 
$$(x + 1)(x - 1) = x^2 - 1$$
is taken to be implicitly universally quantified, i.e. is to be read as shorthand for 
$$\text{for all }x, (x + 1)(x - 1) = x^2 - 1.$$
This gives us a complete statement, which makes a determinate claim  (assuming we have fixed what the variables are supposed to be ranging over). Such a determinate claim is either true or false.
(ii) On the other hand, ripped out of context
$$x = 5$$
makes no complete claim. Such variables are like pronouns, and just as "He is a mathematician" makes no complete claim (and hence is neither true nor false) if nothing fixes who the pronoun is picking out and there is no quantifier to bind it. Free-floating occurrences of $x = 5$ make no complete claim (and hence are neither true nor false).
(iii) Of course $x = 5$ can be part of a complete claim: as in
$$\text{if }x^2 = 25, x = 5$$
which can be true -- e.g. if read with an implied universal quantifier, "for any natural number $x$".
Second There is a particular issue about "reference failure" where (unlike when leaving a pronoun of variable dangling free) the syntax may give us a complete (closed) sentence with no variables left dangling free,  but some putative referring expression in the sentence fails to refer.  
For example, the term $x^2 - 25/x - 5$ in a context which fixes that $x = 5$ fails to denote a number. But the issue about reference failure cuts across issues with variables, since it equally arises with old friends like $1/0$. And it can arise with expressions like $\varphi_7(7)$ where $\varphi_7(\cdot)$ is the $7$-th partial computable function in an enumeration of the partial computable functions, which may be undefined for the argument $7$.
So, to deal with one thing at a time, how should be regard a statement like
$$\varphi_7(7) = 12$$
when the l.h.s. in fact fails to refer to a value? We certainly haven't successfully stated something true. So should we say the equation is false? Or is it neither-true-nor-false. 
Some would say that the latter is the better way to go, the thought being that since $\varphi_7(7)$ is undefined, the whole equation doesn't get to the starting line for making a determinate claim, and so (rather like $x = 5$ ripped out of context) isn't up for assessment as either true or false. But there are considerations the other way. After all, the equation looks like a complete claim that we can reason with it (it feature in a reductio argument, say). And some would therefore say it is better to judge it false. 
The issue gets tangled: accounts of the difference between "neither true nor false" and "false" are inevitably freighted with loadings of disputable semantic theory, and there are no quick answers to be had. It is no good asking the logicians for a quick verdict either. For there is more than one brand of free logic on the market (where a free logic allows for terms that lack denotation): some brands allow truth-value-gaps, other brands say that an empty term [an an atomic wff] makes for falsity.
