This is a bit tricky to explain so please bear with me, I'll try my best to explain it clearly.
The B (first letter) relates to the positioning of the shapes. If you look at the first two examples (C's) you will see they are both joined in a chain, whilst the A of the third example has two joined shapes inside another shape (circle) The B of the fourth has one shape inside the other with the third shape overlapping both these shapes. The mystery diagram matches the positioning of B.
The last letter Z relates to the positioning of the dot. In examples 1 and 3 you will see the dot is inside the circle. Example 2 it is inside the triangle and in the square in example 4.
The mystery diagram has a dot inside the square which gives us B?Z this is enough to find the answer of e BKZ.
The middle letter relates to the shading. Which we know because the third and fourth examples share the same shading and the same letter J, whilst the others all have different shading and different letters. 1 and 2 have two shaded area but different shading, the mystery example has one shaded area but it is different to examples 3 and 4 so has a different code K. Also this all makes logical sense. Well to me anyhow