Multiply by the appropriate conversion factors, each expressed as a fraction. Arrange the units of each conversion fraction so they cancel the units you don't want and give you the units you do want.
A unit equation of the form
x unitA = y unitB
can be written as the fraction (x unitA)/(y unitB) or as (y unitB)/(x unitA). You can multiply by such fractions indiscriminately, because their value is 1. (The numerator is equal to the denominator.) You want to choose the version that lets you get to the desired units.
Here, we start off by converting kg to g, then g to pennyweight. The kg in the numerator of the original density expression is cancelled by the kg in the denominator of the conversion factor. Likewise for g. The result is that we end up with pennyweight in the numerator, as the problem statement requests.
density = mass/volume
(56.15 kg)/(0.222 hogsheads) × (1000 g)/(1 kg) × (1 pennyweight)/(1.55 g)
= (56.15×1000)/(0.222×1.55) pennyweight/hogshead
Now multiply this by the conversion from hogshead to peck.
= (56150 pennyweight)/(0.0.3441 hogshead) × (1 hogshead)/(238.5 L)
= (56150 pennyweight)/(82.06785 L) × (9.091 L)/(1 peck)
= (56150×9.091 pennyweight)/(82.06785 peck)
≈ 6220 pennyweight/peck . . . . rounded to 4 significant digits