Ahhh, now I remember why I did NO CompSci courses...
before university. Such. A. Waste. Of. Time.
Nobody is ever going to ask you to do an expansion like that. Ever. I've worked in hardware design, cryptography, driver design, User Interfaces, Internet comms of all types, and not once have I needed to know how to do expansions/simplifications on boolean algebra. Evaluate boolean expressions, certainly. Determine the correct boolean expression, that's important too. But transform the thing? The ONLY fields where you would ever need to do that these days are graphics engines for 3D games, and physical simulations, both fields requiring large amounts of optimisation of code for good performance. And even there, most transforms will already have been done for you. And if they're not, and if by some bizarre misfortune Mathematica and Matlab can't help you, you do what any self-respecting programmer would do - write a programmer to do it automatically. That way you can't make any dumb errors...
Actually, that's probably not a bad way of answering the question. Write a simple console app that does the transform for you. Give the source code to your teacher as your answer, and see if he gets it ;-) Not only will you learn something useful (text parsing), but you'll avoid wasting your time learning to do something really unimportant.