In the second ending group (forms with inflectional nūn) and the third ending group (the two feminine-plural forms), Lam Kay and Lam al-Amr can produce the same written form.
لِيَسْمَعُوا can mean:
● so that they may listen — لامِ کَی; or
● they should listen — لامِ امر.
The word by itself is insufficient. The surrounding sentence and intended meaning must show which lām is present. This is why a quiz must give context rather than ask you to guess from an isolated form.