Cannot get a part of sprite correctly

The texture origin is at the top left corner. You also have to check, if the texture got rotated, because the origin will be a different one (top right, with height and width interchanged).

The second tile? It’s the tile in the top left corner.
Maybe you should post the Sprite sheet, if possible, so it’s clear how the individual tiles look like.

But it looks different than the first tile you posted. This means, that tilePixelWidth and tilePixelHeight do not equal 32. Did you check on those values?

You can also read this thread. The texture coordinates are explained with a picture: