I came across with a question, Longest Common Subsequence Again | Practice Problems

Why the following approach will not work?

Calculate the LCS between both a and b. Then answer will be

`Math.max(lcs+k1+k2, Math.max(a.length(), b.length()));`

While in editorial they have used dp state k1 and k2 also.