Having difilcuty in understanding limit of k and m

in Case 1 k<=m

how sir as say number of different edges are 2k

In casse 2 k>m

Why m=n-1 It’s mention that they have given graph
and m=n-1 is a case of tree so why saying m=n-1