According to the meaning of the question, the coordinates of A and B are easy to find (0,20) and (30,0), and the analytical formula of straight line AB can be obtained by using the undetermined coefficient method.
I have a detailed process to solve this problem in my handout. The second sub-question can refer to the following figure: