Study of excited states of 39Ca and39K