It depends on whether or not information about the outer layer tiles can be deduced from information about the inner layer tiles. If they can, then database normalization suggests to treat information about the outer layer tiles as redundant and only store information about the inner layer tiles. This is how this might work:
table tile // only inner tiles are recorded
id (or use [castleID, x, y] as a composite primary key])
castleID (int)
x (tinyint) // on a 18x18 grid
y (tinyint) // on a 18x18 grid
content (whatever) // content of the inner tile for castleID at position <x, y>
This will result in 18x18 entries for every castle, assuming that you save all non-castle tiles as well. You could also just store castle tiles and assume that if there isn't a record for a given position, the tile is unoccupied. In order to get information about the outer layer tiles, you have to fetch information about the respective inner layer tiles and deduce information about the outer layer from that.
If, on the other hand, information about the outer layer tiles cannot be deduced from their respective inner layer tiles, you have to add another table for the outer layer tiles:
table outertile
id (or use [castleID, x, y] as a composite primary key])
castleID
x (tinyint) // on a 9x9 grid
y (tinyint) // on a 9x9 grid
content (whatever) // content of the outer tile for castleID at position <x, y>
The content field is just a placeholder for whatever you want to store with respect to your tiles. In actuality, it might be an id of a record in your building table, or several fields like startedBuilding (timestamp), spriteFile (varchar), etc.