You don't need to execute php within a post to accomplish what you want. The easiest method is to create a short-code handler.
Read about it here.
You would write your normal post, and embed the short-code where ever you want an image to appear, then continue writing your post content.
The short-code handler is 'similar' to a callback function and gets executed each time that post is displayed. For your intent, the short-code handler will test whether the post is displayed on the home page, and if true, will display the desired image. If it is false, it will simply remove the short-code you entered and return only the post content, without the image.