By table method, it can solve but complexity is more..
One more method is Tree Method
A = "abbaccda" and B="abcaa"
1) LCS ( "abbaccd", "abca" ) +"a"
2) LCS ( " abbacc", "abca" ) + "a"
3) LCS( "abbacc", "abc")+"a" , LCS ( " abba", "abca" ) + "a"
4) LCS( "abbac", "ab")+"ca"
5) "abca"
At step 3:-
3) LCS ( " abba", "abca" ) + "a"
4) LCS ( " abb", "abc" ) + "aa"
5) "abaa"
X=4 and Y=2 ===> 10 x + 2y = 10 (4) + 22 = 44