You can easily find out LCS length: 3
Now you have three blanks: __ __ __
Now in last blank there will always be a number because all numbers are distinct. Hence, 3 ways.
Now, for the first 2 blanks:
we can fill them by various different combinations like: ba,bd,bc,ac,etc.
Now use hit and trial method to see if these letters exist in both the string given.
You'll get only 4: bc,ac,bd,ad.
Hence: 4*3 = 12