I'm sorry, but your proof is incomplete; you fell into the so-called "induction trap".
For the induction step, you assume that any connected graph with $k$ vertices has at least $k-1$ edges; and you want to prove that any connected graph $G$ with $k+1$ vertices has at least $k$ edges. In trying to prove this, you assume that $G$ was obtained by adding a new vertex (which you confusingly call $k'$) to a connected graph with $k$ vertices. But you have not justified this assumption.
To justify your argument, you would have to show that every connected graph with $k+1$ vertices can be obtained by adding a vertex (and some edges) to some connected graph with $k$ vertices. In other words, you have to show that, given any connected graph with $k+1$ vertices, you can find a vertex whose deletion results in a connected graph. This is true, but requires a proof. (Well, it's true for finite graphs, which is what we're talking about. In a connected infinite graph, it's possible that deleting any vertex disconnects it.)
For an alternative approach, you can delete an arbitrary vertex $v$ from a $k$-vertex graph $G$, without worrying about whether $G-v$ is connected or not; you then apply the induction hypothesis to each connected component of $G-v$, however many there may be. In this approach, you have to use the style of induction where you prove the statement for $k$ assuming that it holds for all numbers smaller than $k$.
Let $a_1, \dotsc, a_6$ be the number of vertices of the components.
We know that $a_i \geq 1$ and $\sum a_i = 25$.
To find the minimum number of edges of $G$, let's first look at a single connected component. A component with $n$ vertices cannot have less than $n-1$ edges. Also, a star graph is connected and have exactly $n-1$ edges, so we can attain this minimum.
Thus, the minimum number of edges in $G$ will be:
$$ \sum_{i=1}^6 (a_i - 1) = \sum_{i=1}^6a_i - 6 = 25 - 6 = 19 $$
The maximum can be found in a similar way. The maximum number of edges in a component with $n$ vertices is $\binom{n}{2}$, that is attained on a complete graph $K_n$. Thus we want to maximize:
$$ \sum_{i=1}^6\binom{a_i}{2} = \sum_{i=1}^6 \frac{a_i(a_i-1)}{2} = \frac{1}{2} \left( \sum_{i=1}^6 a_i^2 - \sum_{i=1}^6a_i \right)$$
$$ = \frac{1}{2} \left( \sum_{i=1}^6 a_i^2 - 25 \right)$$
Note that $\sum_{i=1}^6a_i^2$ is convex, so the maximum is attained on the boundary of the region given by $\sum_{i=1}^6a_i = 25$, so we have a maximum when $a_1 = 1$, $a_2 = 1$, $a_3 = 1$, $a_4 = 1$, $a_5 = 1$ and $a_6 = 20$. Hence the maximum number of edges is:
$$ \frac{1}{2} \left( 20^2 + 5 - 25 \right) = 190$$
That is attained when the components are five copies of $K_1$ and one $K_{20}$.
Best Answer
The result depends on what "isolated" means in the complementary question, corresponding to two interpretations of "connected" in the original question.
If vertices are "connected" by individual edges alone, "isolated" means "degree $0$ in the induced subgraph" and the following argument applies. Suppose that five vertices $v_1,\dots,v_5$ in the complementary graph are linked by the edges $v_1v_2,v_2v_3,v_4v_5$. None of the vertices is isolated, so to maximise the edge count in the complement, all the edges have to be non-adjacent, i.e. the complement consists of $20$ disjoint edges, and the original graph must have at least $\frac{40×39}2-20=760$ edges. (That is, the minimal admissible graph is $K_{40}$ minus a perfect matching.)
If vertices are "connected" in the sense of connected components, the complement cannot have any connected component of five or more vertices, and the number of edges is maximised by ten disjoint copies of $K_4$, having $60$ edges in total; the original graph has at least $\frac{40×39}2-60=720$ edges.