Let B be the number of Black printer ink cartridges and C be the number of color printer ink cartridges.
49 were sold in total, hence,
B+C= 49 ------------(1)
Also, its given that
18.99 B + 27.99 C = 1146.51---------(2)
Multiplying (1) by 18.99,
18.99 B+ 18.99 C= 930.51 ------(3)
Now, subtracting (3) from (2),
18.99 B + 27.99 C = 1146.51
18.99 B+ 18.99 C= 930.51
------------------------------------
9 C = 216
C= 24
We know, B+ C= 49
Hence B = 49-24 = 25
Hence, number of Black printer ink cartridges = 25 and color printer ink cartridges = 24.