Use your favorite text editor (e.g. type xemacs .bashrc)
There should be a line looking like: PATH=$PATH:blabla:.
If there is not, just add one.
In the case of staroffice, the executable is in ~/office52/ where ~ means your home space. Therefore you want to add this to your PATH so that the shell knows where to look for when you type 'soffice'.
Your PATH line should like:
export PATH=$PATH:thatwastherebefore:$HOME/office52/:.
The . at the end is there so that when you type a command, the shell looks in the current directory and you don't have to type './command'