1. For each line the number of #s on the left side is equal to the number of #s on the right side.
2. The number of #s on the left + the number of #s on the right + the number of spaces between them = the width of the shape (which from looking at the picture seems to be 12).
So if you know the width and you know how many #s you printed on the left side, you can calculate how many spaces to print before printing the right side.