I am also going to take the AP CS test on Thursday and am willing to explain the Enlarge function. But first I need to know what it is that you don't understand. Do you want an actual sourcecode answer (I'd have to make it up for you) or do you need to understand the basic concept?

All they're doing is just imitating what an extremely simple graphic editor would do.