I'll write the formal way to say them, you may figure out the informal way later:
1-Did you live in Isfahan ?
Formal way : آیا شما در اصفهان زندگی می کردید؟ transliteration : Aaya shomaa dar esfahaan zendegee mikardeed ?
Conversational way : شما اصفهان زندگی می کردید؟ tl: Shoma esfehaan zendegee mikardeed ?
2-How long did you live there ?
Formal way : برای چه مدتی آنجا زندگی می کردید؟ Baraye che moddati aanjaa zendegee mikardeed ?
Conversational way : چن وقت اونجا زندگی می کردید؟
The point is in English you use past simple for such sentences , but in Persian you should use past continuous : so in Persian it's like : Were you living in Isfahan ? How long were you living there ?