Click X Fren - Anglo3
What we can gather is that the guard ONLY knows the thiefs name and gender; Titus / Male.
If the guard walks in and arrests the correct person without hesitation, that means he did not have time to ask for names.
This means the guard must have done this only based on gender.
The farmer, healer, and librarian must be women. If the guard opened the door and saw only one man, and he knew the thief was a man, then by process of elimination the one man must be the thief.
Answer: The architect was the only man in the room, so the guard knew it must be him.