compression ratio of pixels block
Compression ratio is $$ \frac{N_{uncomp}^b}{N_{comp}^b}$$
where ${N_{comp}^b}$ is the total number bits requried to represent those $3$ pixels $A$,$B$, and $C$ while ${N_{uncomp}^b}$ is the total number of bits required when they are not compressed.

Based on your claims, assuming that, those three pixels had $8$ levels with fixed length coding (FLC) of $3$ bits per pixel then; ${N_{uncomp}^b} = 3 \times 3 = 9$ bits in total. And again based on your variable length code (VLC) of the lossless coding scheme which uses $1$ bit for $A$ and $C$ and $4$ bits for $B$ you have ${N_{comp}^b} = 1 + 4 + 1 = 6$ bits in the compressed case, hence the ratio is $$ \frac{N_{uncomp}^b}{N_{comp}^b} = \frac{9}{6} = \frac{3}{2} $$

which means a $1.5 \times$ reduction in the number of bits required to represent the same source compared to its uncompressed form.

Note that you can also use the reciprocal of that ratio to indicate a similar metric, which would be $2/3$ in this case indicating the size that compressed form will have compared to the original.