add kth element in two sorted arrays