How do I define such a function between the open unit square onto the closed unit square? I cannot think of any definition for a function that will be surjective.
Map (0,1)x(0,1) to (0,2)x(0,2) by multiplying by 2 and then truncate everything outside (0,1)x(0,1) to its support.
Proving it is a matter of cycling through the lemmas and theorems you are allowed to use. For example,
linear functions are continuous
continuous in R2 metric space is topologically continuous
constant functions are continuous
restrictions of continuous function are continuous
composition of continuous functions are continuous
truncating is constant function and identity function respectively over two disjoint subsets; in other words, truncating is the composition of two restrictions of two respective continuous functions
You may find it easier to write out the truncation part using first principle.