Sorry, do you want a 5 gal batch from a 3.5 gal boil (called a partial boil)? Or are you making a 3.5gal batch with a 3.5 gal boil (full boil)? If you are doing the latter, listen to the previous post. If the former, yeah, you can do it. There may be some effects due to the smaller boil (in general, beer benefits from a fuller boil).