The kernel and cokernel can be defined in any pointed category $\mathcal C$ with finite limits and colimits. Recall that a category is pointed it has an object that is both initial and terminal, and we call that object $0$.
Given $f: X\to Y$, the cokernel $Z \cong Y/X$ can be defined as the pushout below
$
\begin{array}{} X & \to & Y \\
\downarrow & & \downarrow & \\
0 & \to & Z \end{array}
$
Dually, the kernel $K$ can be defined as the pullback
$
\begin{array}{} K & \to & 0 \\
\downarrow & & \downarrow \\
X & \to & Y \end{array}
$
Since they're dual, I'll write about cokernels only. Since $\mathcal{A}$ is an abelian category, it has a zero object. Since $\mathcal{A}/\mathcal{B}$ has the same objects as $\mathcal{A}$, it has a zero object, too. Note furthermore that any $B \in \mathcal{B} \subset \mathcal{A}$, is isomorphic to zero in $\mathcal{A}/\mathcal{B}$.
If you have a morphism in $\mathcal{A}/\mathcal{B}$, you can think of it as a morphism in $\mathcal{A}$, compute its cokernel, and then determine what that's isomorphic to in $\mathcal{A}/\mathcal{B}$. For example, suppose $f: X\to X \oplus F$ is a free extension, and $\mathcal{B}$ is the subcategory of projective objects. Then $coker(f) \cong F\cong 0$ in $\mathcal{A}/\mathcal{B}$. The alternative way to compute the cokernel would be to first determine $f$ in $\mathcal{A}/\mathcal{B}$ and then take the pushout in $\mathcal{A}/\mathcal{B}$. For example, because $F\cong 0$, we know $X\oplus F \cong X$ and $f$ is an isomorphism in $\mathcal{A}/\mathcal{B}$. Hence, its cokernel is zero in $\mathcal{A}/\mathcal{B}$.