If you got +3 with a score of 0, you got one upvote and one downvote. 5 - 2 == +3
Here's the vote counts (which you can see with the right privilege):

But you don't need privilege to find the upvotes and downvotes if you know the score and rep. The relationship is represented as a two equations in two variables:
upvotes - downvotes = score
5 * upvotes - 2 * downvotes = rep
Which has this as a matrix representation:
| 1 -1 | | upvotes | | score |
| | * | | = | |
| 5 -2 | | downvotes | | rep |
The matrix above is nonsingular and thus the linear system admits exactly one solution for any given combination of score
and rep
. Nonsingularity is shown by computing that the determinant, 1*(-2) - (-1)*5, is nonzero.
In R, one would solve it thusly:
A <- matrix(c(1,5,-1,-2), 2,2) # The matrix above
A
## [,1] [,2]
## [1,] 1 -1
## [2,] 5 -2
solve(A, c(0, 3)) # Represent 0 score, +3 rep
## [1] 1 1
One upvote and one downvote.
The same technique works for answers, as the following matrix is also nonsingular:
| 1 -1 |
| 10 -2 |
Again, the determinant, 1*(-2) - 10*(-1), is nonzero. And applied to this answer at this time, we have 98 points due to votes, and a score of 9. So we solve:
| 1 -1 | | upvotes | | 9 |
| | * | | = | |
| 10 -2 | | downvotes | | 98 |
Again using R to solve the system, we get 10 upvotes and 1 downvote:
A <- matrix(c(1,10,-1,-2),2,2)
solve(A, c(9,98))
## [1] 10 1