If you can hit a target at 25 yards, you can hit it at 5 yards. The reverse may not be true. More accuracy is better.
Will you be "hung out to dry" over a 25 yard shooting? Depends on totality of circumstances. If the other actor has shown intent to harm, has a weapon that can do harm from 25 yards, and a safe lane of retreat is not a relatively sure thing, then shooting at 25 yards is justifiable in any US jurisdiction.