I am looking for books on these two topics at the undergraduate level, an absolute must is that they contain problems with solutions. I hate when books give you 50 exercises after a chapter and then don't provide solutions to any of them.
Alternatively, could you suggest a book for the theory part and a separate exercise book with solutions?
Jim Hefferon's book Linear Algebra is provided for free, along with all of the solutions, on his website. It also happens to be a really good introductory book (not quite Linear Algebra Done Right good, but I'd still put it above average).
I haven't ever read a real analysis book with solutions but a quick Google search has provided a couple: