Официальные правила говорят нам, что
If a player accidentally scores a field goal in his team’s basket, the goal counts 2 points and shall be entered on the scoresheet as having been scored by the captain of the opponents’ team on the playing court.
Откуда именно был бросок - неважно.