Sort A, sort Bin descending order (prove that this is the best opportunity you can achieve) and check:
int[] A = new int[] { 2, 1, 3 };
int[] B = new int[] { 7, 8, 9 };
int maxK = A
.OrderBy(x => x)
.Zip(B.OrderByDescending(x => x), (a, b) => a + b)
.Min();
maxK == 10, , k <= maxK == 10;