Math PROOF for divisibility of 3 rule

I have to write a math proof for the following rule:

A number is divisible by 3 if and only if the sum of its digits are divisible by 3.

My teacher gave us an example of a mathematical proof of the divisibility rule for 9 which is the same as 3 - A number is divisible by 9 if and only if the sum of its digits are divisible by 9

t+u=9

u=9-t

N=10t+u

N=10t+9-t

N=9t+9

N=9(t+1)

9 divides N

I do not understand this process. Can anyone show me the proof for the divisibility rule for 3?