It's true your Toyota passed the smog test at 25mph, however the HC
(hydrocarbons) it produced at both 15mph and 25mph are both very high;
indicating there is in fact an emissions related problem. Now to answer your
question of why it passed the 25mph and not the 15mph, it's simple. The
dynamometer puts 50% load on your cars engine during the 15mph portion and
only 25% load during the 25mph part. The added strain on the engine during
the 15mph portion of the smog inspection will bring out the emissions faults
of any vehicle; and so is its purpose.
As far as why your Camry produced high HC... The faults may be many, and
will depend on what the rest of the emissions numbers looked like. The main
reason vehicles fail high HC is defective ignition system. You must ensure
your engine's ignition system is functioning properly, by inspecting all the
sparkplugs and their wires.
The best recommendation I can give is to have your Toyota inspected by a
smog check repair station. They will be able to tell you exactly what's
causing your Toyota to fail for high HC without you spending money on
unnecessary repairs.