From the given conditions, we have two equations:
\[
f(1) = a(1) + b = 1 \quad \Rightarrow \quad a + b = 1, \tag{1}
\]
\[
f(2) = a(2) + b = 3 \quad \Rightarrow \quad 2a + b = 3. \tag{2}
\]
Solving equations (1) and (2) simultaneously:
\[
b = 1 - a.
\]
Substituting this into equation (2):
\[
2a + (1 - a) = 3 \quad \Rightarrow \quad a = 2.
\]
Substituting \( a = 2 \) into equation (1):
\[
2 + b = 1 \quad \Rightarrow \quad b = -1.
\]
Thus, the function is:
\[
f(x) = 2x - 1.
\]
Checking one-one (Injective):
Since \( f(x) = 2x - 1 \) is a linear function with a non-zero slope, it is one-one.
Checking onto (Surjective):
To check onto, solve \( f(x) = y \) for \( x \):
\[
y = 2x - 1 \quad \Rightarrow \quad x = \frac{y + 1}{2}.
\]
Since \( x \in R \) for all \( y \in R \), the function is onto.
Final Answer:
The function \( f(x) = 2x - 1 \) is both one-one and onto.