What distance from the hinge is the best spot to install door stop?

Farther from the hinge the better. When possible I use base mount door stops, one would work here as well. But if you prefer to use the floor mount, keep it a few inches from the edge of the door. Do not use hinge type door stops only when absolutely necessary, if the door swings back too hard on it it will either pull the screws out of the hinge or if it is a hollow core door it will put a hole in it. Been there, done that.
The door stop should be about two-thirds of the way from the hinge if you want to minimise the forces on the hinges and flexing of the door.
The distance two-thirds is the centre of percussion for a flat sheet of uniform density hinged at one edge.
You might be able to fine-tune the location by using a bit of 2x1 wood butted up against the baseboard and testing where the least unsatisfactory bang and rattle occurs.
I'm using wall mounted soft stops that match the location of the doorknob (or even cover the hole left by not having a stop).
For what you show, the best place is at the edge of the door. Just like it’s easier to push a door at the farthest point from the hinge (as opposed to in the middle or close to the hinge) it is more effective at stopping the door and less like a lever for ripping the stop out of the ground by placing it as far from the hinge as possible.
The farther from the hinge, the better.
When you screw it in to the floor, leave the screw a bit loose so the stop can pivot. Then gently open the door to the stop, allowing the stop to "square" to the door. Then tighten down the screw.
Also, think about how far the stop should be from the wall. If the door is a typical hollow core internal door, it can flex quite a bit. You want the stop far enough from the wall that if the door is opened forcefully, the handle doesn't touch the wall. Otherwise, you could could end up with a ding or hole in the wall.
The correct place to install it is vertically under the position where the door-handle would strike the wall if the stop were not there. Like others have said, install solidly with long screws going down into the substrate.