Example 12 :Find the value of k