It doesn't have to be continuous. It has already been shown that f(1)=1. Let x be a positive rational number. Then there is an integer p and a positive integer q such that x = p/q.
Therefore f(x) = f(p/q) = f(p)*f(1/q)
Furthermore, we can use a trick to show that f(1/q) = 1/q.
Ok. Now it is your turn:
i) Why is f(x) positive for all positive x?
ii) Why is f(x) monotonically increasing?
iii) Why is f(x)=x even for x in R\Q?
i) f(x) is positive whenever x is positive.
Proof. Since x is positive, x has a positive square root, say, y = sqrt(x). Then
f(x) = f(y)*f(y) > 0 for all positive x.
ii) f(x) is monotonically increasing.
Proof. In fact, if y > x then y - x > 0, and, by proposition i), f(y-x) = f(y)-f(x) > 0 => f(y)>f(x).
iii) f(x)=x for all x in R.
Proof. Suppose f(x) < x for some x in R. There is, however, a rational number y such that f(x) < y < x. But y < x implies y = f(y) < f(x), i.e., f(x)<y<f(x), a contradiction.
Your proof is equally good thought, good job!