Schengen area with two different passports that have two different last names
One of my good friends is taking a gap year between high school and college and has signed up for a course in italy for about 115 days. She applied for a student visa but was denied multiple times because she is only taking language courses and those aren't deemed a good enough reason for a student visa. She has two different passports with two different last names on the passports, is it possible for her to enter the schengen area with one passport, leave before the 90 days are up then come back in with the other passport for the last 25 days of the course? Is this a legal thing to do, and do people do it? if not, do people get caught for it?