A call to function square is made with the argument as 5 and then storing the result in the integer x which was defined above in the line 7.So when function square is called with value 5 the square function will return 5*5 that is 25 as an integer so we have to store it in an integer that was done by assigning it to integer x.
Oh a document, I do not believe that you have type on images, but if you were to type a text in a app called PicsArt and saved it and then put it onto the document over the picture it would work.