This is a photo of the time I participated in the school marathon.
「の写真です」という部分は this is a photo of ~ で言えます。
例文 This is a photo of me studying English.
「これは私が英語を勉強している写真です。」
例文 This is a photo of when I went to Mt Fuji.
「この写真は私が富士山に行った時の写真です。」
参考になれば幸いです。
This picture was taken the day I took part in my school race.
日本語ではフルマラソン(42.195km)を走らなくてもマラソン大会と言いますが、英語でmarathon は基本 42.195kmの距離を走る場合に使います。なので次のように言うのが良いかなと思います。
ーThis picture was taken the day I took part in my school race.
「これは学校のマラソン大会に参加した時に撮られた写真です」
ご参考まで!