It will be decades before it can tackle the "creativity" needed to draft complex transactional legal documents, let alone litigation-related documents. I can't comment on finance, but law is not about "wrote procedural operations from a complex set of rules." The law is relatively simple--it is, and always has been, the application of the law that is complex, and this is why lawyers get paid so much. (This same logic generally applies to programming -- the syntactic rules of a language are simple, but the application of those rules is highly complex.)
Indeed, anything beyond the simplest legal work requires a very highly contextual understanding of both the applicable law and the facts of the situation which is currently beyond the capabilities of current software or hardware (and that includes currently available or near-available quantum optimizers).
AI will replace legal work about the same time as it replaces programming.
The other fun part is what happens when AI is good enough to replace the gophers who do most of the grunt work, but not yet good enough to replace the experts who figure out what the customers really want. If this stage lasts long enough for the experts to retire, where do new experts come from?
Anyway there'll probably always be people behind the algorithms doing the modeling or programming at least.