You can set up these units anywhere in your territory, as long as all models from the unit are within 3" of the edge of the battlefield and more than 12" from any enemy models.
'Within' does not mean 'entirely within'. As long as a part of the model is no more than 3" from the edge of the battlefield then the model is "... within 3" of the edge of the battlefield..."