So sorry, there is no way to be able to undo the effects the portal does on a pet. The only solution to that is to buy the potion, costume or enchanted plushie to be able to turn your pet back the way it was. Depending the type of pet it used to be, it can cost anywhere from 500MP to millions of marapoints! In the other hand you can keep portaling the pet, and hopefully you get a satisfactory change eventually. The chances of you getting the same pet you lost are almost none.
Also I should mention that the rules state only one person is allowed to play in one account. If it was an accident and you forgot to log out, then your brother started to play without noticing you were logged in; then it's perfectly understandable. But this should not continue to happen because if staff should believe two players are using the same account; the account could be in danger of getting banned.