How to get the max value from a self define function?

As the picture above, I want to get the max value for the function K,under a certain condition, but the max() return the value like a matrix,so how can I get the right value?

As the picture above, I want to get the max value for the function K,under a certain condition, but the max() return the value like a matrix,so how can I get the right value?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.