You have three operations at each step:
Insert: Add a character to A. Moves from to in DP (you matched B[j] by inserting).
Delete: Remove a character from A. Moves from to (discarded A[i]).
Replace: Change a character in A. Moves from to (aligned A[i] with B[j]). Each operation costs 1. If characters match, no operation needed.