Events in the first year following the Prophet's arrival in Medina

Why was it significant that one of the Prophet’s first task was to construct mosques at Quba and Madina?

Relationship with the non-Muslims