In a perfect square trinomial , the terms are in the form of
 , so that it can be factored and we get 

Now lets compare the given expression

Now we can compare this with 

we get a=x , 2ab = -10x
So we get 
2(x) b = -10x
it means 2b = -10
b=-5
But 

Hence, n= 25