Technically, you don't "find the image" of a function, you find the image of a set by a function: the image of set A, by function f, is \{ y| y= f(x), x\in A\}.
As Plato said, the set of rational numbers is defined as the set of all fractions, \frac{a}{b} with a any integer, b any positive integer (taking the denominator from the positive integers let's us assign the sign of the fraction to the numerator and voids division by 0).
Now, if y is any rational number, there exist integer, m, and positive integer, n, such that y= m/n. That is precisely f(m, n) so every rational number is in the image.
Conversely, for any pair, (m, n), m an integer, n a positive integer, f(m,n)= m/n is a rational number so the image is precisely the set of rational numbers.
(This function is NOT "one-to-one", f(2, 4)= f(1, 2), but that is not relevant to this problem.)