How can I prove that my greedy algorithm for least guards is optimal?
You can achieve this per induction over the position of the last artwork. Note that in the optimal strategy the guard must be put 5 meter ahead of the left most artwork and not exactly at it.

In the induction step you have to consider an additional artwork and distinct two cases, whether it is covered by the last fixed guard or not. If it is, you do not have to add one and hence, the optimal can not be better. In case it is not, it is easy to show, that an optimal that woul have covered it should have used strictly more guards.