Longest Common Subsequence Via Dynamic Programming
Your question is clear and you are performing the method correctly, as far as see. 

But it seems to be a misunderstanding about what the problem solves about strings.
The longest common subsequence problem is about find out a  subsequence of characters in the case of string, not necessary consecutive like substrings. 

By example, some subsequences of AAGCT are: AG, AT, ACT, AGT