Having just one root requires

    eq1 = -k^x + x^2 == 0;
    eq2 = D[-k^x + x^2, x] == 0
    (* 2*x - k^x*Log[k] *)

`FindRoot` can solve for `x` and `k` simultaneously.

    FindRoot[{eq1, eq2}, {{x, 2.5}, {k, 2}}]
    (* {x -> 2.71828, k -> 2.08707} *)