Yes Answer is 5.
But in general form we can conclude it like --
We have 'n' vertices and 'k' equally sized connected components.
Then each components has (n/k) vertices . And now we will check maximum edges in a particular components using formula of complete graph(nC2) . So here, maximum edges in 1 component = [n/k] [(n/k)-1] / 2 = x(say it)
And total edges will be -- = number of components* maximum edges in each component= k * x.
You can simplify more and you will get, maximum number of edges = [n *(n-k)] /2k.
Now put n=10, k=5
maximum edges= 10*5/2*5 = 5