A baker has some packets of sugar and some packets of flour. He has 22 more packets of sugar than packets of flour. Each packet of sugar is 1.5 kg. Each packet of flour is 1.7 kg more than each packet of sugar. The total mass of all the packets of sugar and packets of flour is 225.7 kg. How many such packets of sugar does he have?

Let x be the number of packets of flour.

The number of packets of sugar is x + 22.
So, the total number of packets is equal to x + x + 22 = 2x + 22 = 225.7 kg / 1.5 kg/packet = 150.47 packets.
Thus, 2x + 22 = 150.47 and the number of packets of sugar, x + 22 = 55.235 packets.
Hence, the baker has 55 packets of sugar. Answer: \boxed{55}.

Let's assume the number of packets of sugar as 'x'.

Since the baker has 22 more packets of sugar than packets of flour, the number of packets of flour can be represented as 'x - 22'.

We know that each packet of sugar is 1.5 kg, so the total mass of the packets of sugar would be 1.5x kg.

Each packet of flour is 1.7 kg more than the packet of sugar, so the mass of each packet of flour would be (1.5x + 1.7) kg.

The total mass of all the packets can be represented by the equation:
1.5x + (1.5x + 1.7) = 225.7

Simplifying the equation:
3x + 1.7 = 225.7
3x = 225.7 - 1.7
3x = 224
x = 224 / 3
x = 74.67

Since the number of packets should be a whole number, we can assume that the baker has 74 packets of sugar.

Therefore, the baker has 74 packets of sugar.