If you don't get the satire going on here, Kantian ethics believes that a deed must be universally applicable and not use humans as a means to an ends, but rather ends themselves.
The contradiction is that the main character here is being used as a means to an end to get his mother and sister to Mecca, despite the fact that he's causing others more harm by doing this then he would if he had killed them from the beginning, which satisfies that he is not using people as a means to an end and its universality in action as he is preventing the perpetuation of more crime that he, ironically, is forced to commit by circumstance.
-His family's maxim is that they want him to harm as many people as possible to provide an their ends. However, this principle can not be applied universally without causing others harm.
-However, their desire to go on the Hajj to Mecca without him only to pray that his situation will improve without directly helping him is using him as an ends to a means, and not the means itself
-Therefore, the system is immoral, and must be ended
The cliffnotes version is that the author is saying that Kant's philosophy doesn't work because in his view, what just happened would be considered moral.
https://en.wikipedia.org/wiki/Kantian_ethics