Step 1: Use the inverse relation.
Since $B = A^{-1}$, the product $AB$ must equal the identity matrix $I$.
Step 2: Target an entry that isolates $b$.
The $(3,3)$ entry of $AB$ must equal $1$: row $3$ of $A$ times column $3$ of $B$ gives $(2)(b) + (4)(2) + (7)(1) = 1$.
Step 3: Solve for $b$.
$2b + 8 + 7 = 1 \Rightarrow 2b = -14 \Rightarrow b = -7$.
Step 4: Target an entry that isolates $a$.
The $(2,1)$ entry of $AB$ must equal $0$: row $2$ of $A$ times column $1$ of $B$ gives $(1)(13) + (1)(-3) + (a)(-2) = 0$.
Step 5: Solve for $a$.
$13 - 3 - 2a = 0 \Rightarrow 10 = 2a \Rightarrow a = 5$.
Step 6: Verify consistency.
Checking the $(1,3)$ entry with $b=-7$: $(1)(-7)+(2)(2)+(3)(1) = -7+4+3 = 0$, exactly as $I$ requires. So $a = 5$, $b = -7$.
\[ \boxed{a = 5,\ b = -7} \]